changed variable names

This commit is contained in:
Maja Joksovic 2020-07-28 10:03:46 +02:00
parent 784ea2b061
commit 000ce564ff
1 changed files with 3 additions and 3 deletions

View File

@ -9,11 +9,11 @@ public class JavaNio {
public static void copyDirectory(String sourceDirectoryLocation, String destinationDirectoryLocation) throws IOException {
Files.walk(Paths.get(sourceDirectoryLocation))
.forEach(a -> {
Path b = Paths.get(destinationDirectoryLocation, a.toString()
.forEach(source -> {
Path destination = Paths.get(destinationDirectoryLocation, source.toString()
.substring(sourceDirectoryLocation.length()));
try {
Files.copy(a, b);
Files.copy(source, destination);
} catch (IOException e) {
e.printStackTrace();
}