Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/3#discussion_r13617215
--- Diff: stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/cache/FileCache.java ---
@@ -93,6 +104,35 @@ public void shutdown() {
}
}
+ public static void copy(Path sourcePath, Path targetPath, boolean executable) throws IOException {
+ FileSystem sFS = sourcePath.getFileSystem();
+ FileSystem tFS = targetPath.getFileSystem();
+ if (!tFS.exists(targetPath)) {
+ if (sFS.getFileStatus(sourcePath).isDir()) {
+ tFS.mkdirs(targetPath);
+ FileStatus[] contents = sFS.listStatus(sourcePath);
+ for (FileStatus content : contents) {
+ String distPath = content.getPath().toString();
+ if (content.isDir()) {
+ if (distPath.endsWith("/")) {
--- End diff --
here, you could have also done `if(content.isDir() && distPath.endsWith("/"))` to save one `if` statement.
But you don't need to update the PR for that ;)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at
[hidden email] or file a JIRA ticket
with INFRA.
---