del anterior para conectar bien estemaster
| @ -0,0 +1,6 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <classpath> | |||||
| <classpathentry kind="src" path="src"/> | |||||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | |||||
| <classpathentry kind="output" path="bin"/> | |||||
| </classpath> | |||||
| @ -0,0 +1,17 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <projectDescription> | |||||
| <name>tree</name> | |||||
| <comment></comment> | |||||
| <projects> | |||||
| </projects> | |||||
| <buildSpec> | |||||
| <buildCommand> | |||||
| <name>org.eclipse.jdt.core.javabuilder</name> | |||||
| <arguments> | |||||
| </arguments> | |||||
| </buildCommand> | |||||
| </buildSpec> | |||||
| <natures> | |||||
| <nature>org.eclipse.jdt.core.javanature</nature> | |||||
| </natures> | |||||
| </projectDescription> | |||||
| @ -0,0 +1,31 @@ | |||||
| package jorpelu.com; | |||||
| import java.io.File; | |||||
| public class Tree { | |||||
| public static void main(String[] args) { | |||||
| String ruta="."; | |||||
| if (args.length>=1) ruta = args[0]; | |||||
| File fich = new File(ruta); | |||||
| if(!fich.exists()) { | |||||
| System.out.println("No exite "+ruta); | |||||
| } else { | |||||
| if(fich.isFile()) { | |||||
| System.out.println(ruta+" es un fichero"); | |||||
| } else { | |||||
| System.out.println(ruta+" es un directorio"); | |||||
| File[] ficheros=fich.listFiles(); | |||||
| for (File f:ficheros) { | |||||
| String textoDescr = f.isDirectory() ? "/" : | |||||
| f.isFile() ? "_" : "?"; | |||||
| System.out.println("("+textoDescr+") "+f.getName()); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| @ -0,0 +1,9 @@ | |||||
| /** | |||||
| * | |||||
| */ | |||||
| /** | |||||
| * @author jorge | |||||
| * | |||||
| */ | |||||
| module tree { | |||||
| } | |||||