fixed indentation
This commit is contained in:
parent
000ce564ff
commit
6fc0c42586
@ -9,14 +9,14 @@ public class JavaNio {
|
|||||||
|
|
||||||
public static void copyDirectory(String sourceDirectoryLocation, String destinationDirectoryLocation) throws IOException {
|
public static void copyDirectory(String sourceDirectoryLocation, String destinationDirectoryLocation) throws IOException {
|
||||||
Files.walk(Paths.get(sourceDirectoryLocation))
|
Files.walk(Paths.get(sourceDirectoryLocation))
|
||||||
.forEach(source -> {
|
.forEach(source -> {
|
||||||
Path destination = Paths.get(destinationDirectoryLocation, source.toString()
|
Path destination = Paths.get(destinationDirectoryLocation, source.toString()
|
||||||
.substring(sourceDirectoryLocation.length()));
|
.substring(sourceDirectoryLocation.length()));
|
||||||
try {
|
try {
|
||||||
Files.copy(source, destination);
|
Files.copy(source, destination);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user