Browse Source

Readme provisional

master
Ivan Morell 2 years ago
parent
commit
c5cda5801a
3 changed files with 54 additions and 5 deletions
  1. +34
    -3
      README.md
  2. BIN
      bin/Package/MiTree.class
  3. +20
    -2
      src/Package/MiTree.java

+ 34
- 3
README.md View File

@ -3,16 +3,47 @@
Mi Propio Tree
## Install
´´´
1.- Instala Spring
2.- Copia el código
3.- Ejecuta el código
´´´
## Usage
Ejecuta el programa para que funcione similar a como funcionaria "tree" en un terminal
.classpath
.git
branches
COMMIT_EDITMSG
config
HEAD
hooks
index
logs
HEAD
refs
heads
master
objects
pack
refs
heads
master
tags
.project
.settings
org.eclipse.core.resources.prefs
org.eclipse.jdt.core.prefs
bin
module-info.class
Package
MiTree.class
README.md
src
module-info.java
Package
MiTree.java


BIN
bin/Package/MiTree.class View File


+ 20
- 2
src/Package/MiTree.java View File

@ -3,7 +3,9 @@ package Package;
import java.io.File;
public class MiTree {
static int cont = 1;
public static void main(String args[]) {
String ruta=".";
@ -20,12 +22,28 @@ public class MiTree {
return;
for(File f : file.listFiles()) {
System.out.println(f.getName());
if(f.isDirectory()) {
cont++;
print(f);
treeRecursividad(f);
} else {
print(f);
}
}
}
private static void print(File f) {
String tab = " ";
if(cont != 1) {
for(int i = 1;i<cont;i++) {
String masTab = "| ";
tab.concat(masTab);
}
}
System.out.println(tab+f.getName());
}
}

Loading…
Cancel
Save