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("/")) {