Browse Source

inicializacion de un repositorio nuevo, Copio y pego lo que he salvado

del anterior para conectar bien este
master
vigliom 2 years ago
parent
commit
ac4e840ac2
6 changed files with 63 additions and 0 deletions
  1. +6
    -0
      .classpath
  2. +17
    -0
      .project
  3. BIN
      bin/jorpelu/com/Tree.class
  4. BIN
      bin/module-info.class
  5. +31
    -0
      src/jorpelu/com/Tree.java
  6. +9
    -0
      src/module-info.java

+ 6
- 0
.classpath View File

@ -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>

+ 17
- 0
.project View File

@ -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>

BIN
bin/jorpelu/com/Tree.class View File


BIN
bin/module-info.class View File


+ 31
- 0
src/jorpelu/com/Tree.java View File

@ -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());
}
}
}
}
}

+ 9
- 0
src/module-info.java View File

@ -0,0 +1,9 @@
/**
*
*/
/**
* @author jorge
*
*/
module tree {
}

Loading…
Cancel
Save