Browse Source

metodo Listar creado

master
AntonioFrische 2 years ago
parent
commit
d480f389ce
2 changed files with 14 additions and 0 deletions
  1. BIN
      bin/antoniofrische/com/ActListar.class
  2. +14
    -0
      src/antoniofrische/com/ActListar.java

BIN
bin/antoniofrische/com/ActListar.class View File


+ 14
- 0
src/antoniofrische/com/ActListar.java View File

@ -1,8 +1,22 @@
package antoniofrische.com; package antoniofrische.com;
import java.io.File;
public class ActListar { public class ActListar {
public static void main(String args[]) { public static void main(String args[]) {
} }
public static void ListDirectorio(File path, String location) {
File[] archList = path.listFiles();
for(int i = 0; i < archList.length; i++) {
if(archList[i].isDirectory()) {
System.out.println(location + archList[i].getName());
ListDirectorio(archList[i]," ");
}else {
System.out.println(location + archList[i].getName());
}
}
}
} }

Loading…
Cancel
Save