diff --git a/bin/dam/daw/com/es/HolaFicheroPermisos.class b/bin/dam/daw/com/es/HolaFicheroPermisos.class index 8f94fc2..85f24f3 100644 Binary files a/bin/dam/daw/com/es/HolaFicheroPermisos.class and b/bin/dam/daw/com/es/HolaFicheroPermisos.class differ diff --git a/src/dam/daw/com/es/HolaFicheroPermisos.java b/src/dam/daw/com/es/HolaFicheroPermisos.java index 335e48b..06ffaac 100644 --- a/src/dam/daw/com/es/HolaFicheroPermisos.java +++ b/src/dam/daw/com/es/HolaFicheroPermisos.java @@ -9,7 +9,8 @@ public class HolaFicheroPermisos { public static void main(String[] args) throws IOException { // creating a file instance - File file = new File("C:\\Users\\kevin\\Documents\\workspace-spring-tool-suite-4-4.16.0.RELEASE\\CreoFicheroWindows.txt"); + File file1 = new File("C:\\Users\\kevin\\Documents\\workspace-spring-tool-suite-4-4.16.0.RELEASE\\CreoFicheroWindows.txt"); + File file2 = new File("C:\\Users\\kevin\\Documents\\workspace-spring-tool-suite-4-4.16.0.RELEASE\\CreoFicheroWindows2.txt"); // check if the file exists boolean exists = file.exists(); @@ -18,8 +19,8 @@ public class HolaFicheroPermisos { // printing the permissions associated with the file System.out.println("Executable Readable Writable lastimewrite Lengh Name"); System.out.println("---------- --------- --------- ------------- ------ -----"); - System.out.println(file.canExecute() + " " + file.canRead() + " " + file.canWrite() +" "+ new Date(file.lastModified())+ " "+ file.length()+" "+ file.getName()); - + System.out.println(file1.canExecute() + " " + file1.canRead() + " " + file1.canWrite() +" "+ new Date(file1.lastModified())+ " "+ file1.length()+" "+ file1.getName()); + System.out.println(file2.canExecute() + " " + file2.canRead() + " " + file2.canWrite() +" "+ new Date(file2.lastModified())+ " "+ file2.length()+" "+ file2.getName()); } else {