changed variable names
This commit is contained in:
parent
784ea2b061
commit
000ce564ff
|
@ -9,11 +9,11 @@ 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(a -> {
|
.forEach(source -> {
|
||||||
Path b = Paths.get(destinationDirectoryLocation, a.toString()
|
Path destination = Paths.get(destinationDirectoryLocation, source.toString()
|
||||||
.substring(sourceDirectoryLocation.length()));
|
.substring(sourceDirectoryLocation.length()));
|
||||||
try {
|
try {
|
||||||
Files.copy(a, b);
|
Files.copy(source, destination);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue