|
|
@ -10,27 +10,31 @@ public class main { |
|
|
|
File arch; |
|
|
|
for(int i = 0; i < lista.length; i++) { |
|
|
|
arch = new File(lista[i]); |
|
|
|
System.out.print(lista[i]); |
|
|
|
System.out.print(" "); |
|
|
|
if(arch.isDirectory()) |
|
|
|
System.out.print("directorio"); |
|
|
|
|
|
|
|
if(arch.canRead()) |
|
|
|
System.out.print("r"); |
|
|
|
else |
|
|
|
System.out.print("archivo"); |
|
|
|
System.out.print(" "); |
|
|
|
if(arch.canExecute()) |
|
|
|
System.out.print("ejecutable"); |
|
|
|
System.out.print("-"); |
|
|
|
if(arch.canWrite()) |
|
|
|
System.out.print("w"); |
|
|
|
else |
|
|
|
System.out.print("no_ejecutable"); |
|
|
|
System.out.print(" "); |
|
|
|
if(arch.canRead()) |
|
|
|
System.out.print("lectura"); |
|
|
|
System.out.print("-"); |
|
|
|
if(arch.canWrite()) |
|
|
|
System.out.print("x"); |
|
|
|
else |
|
|
|
System.out.print("no lectura"); |
|
|
|
System.out.print("-"); |
|
|
|
|
|
|
|
System.out.print(" "); |
|
|
|
if(arch.canWrite()) |
|
|
|
System.out.println("escritura"); |
|
|
|
if(arch.isDirectory()) |
|
|
|
System.out.print("D"); |
|
|
|
else |
|
|
|
System.out.println("no escritura"); |
|
|
|
System.out.print("F"); |
|
|
|
|
|
|
|
System.out.print(" "); |
|
|
|
System.out.print("bytes: " + arch.length()); |
|
|
|
System.out.print(" "); |
|
|
|
System.out.print(lista[i]); |
|
|
|
System.out.println(""); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|