Browse Source

coommit

master
Yaroslav 2 years ago
parent
commit
48d59503d7
1 changed files with 20 additions and 16 deletions
  1. +20
    -16
      mkdir1/src/mkdir1/main.java

+ 20
- 16
mkdir1/src/mkdir1/main.java View File

@ -10,27 +10,31 @@ public class main {
File arch; File arch;
for(int i = 0; i < lista.length; i++) { for(int i = 0; i < lista.length; i++) {
arch = new File(lista[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 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 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 else
System.out.print("no lectura");
System.out.print("-");
System.out.print(" "); System.out.print(" ");
if(arch.canWrite())
System.out.println("escritura");
if(arch.isDirectory())
System.out.print("D");
else 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("");
} }
} }


Loading…
Cancel
Save