From ddebae0e736385711ec899a16ed7343d64be7640 Mon Sep 17 00:00:00 2001 From: Joan Moncho Date: Tue, 27 Sep 2022 16:35:57 +0200 Subject: [PATCH] FaltaActualizar --- .classpath | 10 +++++++ .project | 17 ++++++++++++ .settings/org.eclipse.core.resources.prefs | 2 ++ .settings/org.eclipse.jdt.core.prefs | 14 ++++++++++ README.md | 0 .../ManejoFichero/TreeCommand.class | Bin 0 -> 1364 bytes .../ManejoFichero/package-info.class | Bin 0 -> 134 bytes .../joanmoncho/ManejoFichero/TreeCommand.java | 25 ++++++++++++++++++ .../ManejoFichero/package-info.java | 1 + 9 files changed, 69 insertions(+) create mode 100644 .classpath create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 README.md create mode 100644 bin/com/joanmoncho/ManejoFichero/TreeCommand.class create mode 100644 bin/com/joanmoncho/ManejoFichero/package-info.class create mode 100644 src/com/joanmoncho/ManejoFichero/TreeCommand.java create mode 100644 src/com/joanmoncho/ManejoFichero/package-info.java diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..57bca72 --- /dev/null +++ b/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..8aa3297 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + ManejoFicheros + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8c9943d --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,14 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/bin/com/joanmoncho/ManejoFichero/TreeCommand.class b/bin/com/joanmoncho/ManejoFichero/TreeCommand.class new file mode 100644 index 0000000000000000000000000000000000000000..86e5ec26ffb96687618092ed185ab59f21574dcf GIT binary patch literal 1364 zcma)6OH&hB7(F+yPC~2D5TY`SD5EApiRcWD#=!@V8887Q7)x1Lm*xtM>F!jgvBtfB z!sV=HJuc9isdDGWzv6!o&uyY67K_>3?|$!dzVCK_`1J2P0Keg(ftWzS_TBQ1FFn`y z>}|hXlb+h~7aV(A1%7!gP-@n9UFmHaNC@=r$mg=$l-^c(Wn)L#p+M?}<2m7sK)g_F z2qb3xO_fC)852pQ1ddf5Pc84d8!A|n8%-r(Ref7F8!~XT-Z3V^ZKo|zs{UU*6@g4E zaJ+EA(M87#)d-v8m$jjCphZaQA;Y#R#YP4L7&Kt@@Tk9NhsrfEgd92eyQGx+TI!x| zzP&_R3Jc;0m_%8i&uPy&0oU&bFQUai*4`--m$lchrMIf&rndcT;ulPFJWZz^ZHhY{C=}NZ zKz>dPN)Se0)?TzA$+AV1-mPkB}mVTrjO8Z$&wxUO5;5MJzccmHY zN{6h53ms3-T=`&u(eOT%f_ zjq}3=Phvrer$Mbu$)-q_-XQ%CFEM0!YPUZ7c$x`Kwf~TRWZiv(nzcf} q-zH@-1sG)L5D^da%y;3-;XYRBkHbPe!k6Oo)_9At(F1y7XnY1$S0sr5 literal 0 HcmV?d00001 diff --git a/bin/com/joanmoncho/ManejoFichero/package-info.class b/bin/com/joanmoncho/ManejoFichero/package-info.class new file mode 100644 index 0000000000000000000000000000000000000000..f22d6b515f4b37efde451c9fbf8491b006d93e90 GIT binary patch literal 134 zcmX^0Z`VEs1_oOOc6J6PMh4B~{9OI4{KUN6{Ji9he0|@)S`U-g2d$P z#Pn3%%)GRGb_Nzk27#=^vPAuy#JqHU|D>$c&UdLYGO V3=E76%s?AKfRTX}NHQ_70Ra6IBrgB} literal 0 HcmV?d00001 diff --git a/src/com/joanmoncho/ManejoFichero/TreeCommand.java b/src/com/joanmoncho/ManejoFichero/TreeCommand.java new file mode 100644 index 0000000..fe98832 --- /dev/null +++ b/src/com/joanmoncho/ManejoFichero/TreeCommand.java @@ -0,0 +1,25 @@ +package com.joanmoncho.ManejoFichero; + +import java.io.File; +import java.io.IOException; + +public class TreeCommand { + + public static void printFile(File f, String spaces) { + + System.out.println(spaces.concat(File.separator).concat(f.getName())); + if (f.isDirectory() && f.canRead()) { + for (File file : f.listFiles()) { + printFile(file, spaces.concat(" ")); + } + } + } + + public static void main(String[] args) throws IOException { + final String ANSI_RED = "\u001B[31m"; + final String ANSI_RESET = "\u001B[0m"; + + printFile(new File(".."), ""); + } + +} \ No newline at end of file diff --git a/src/com/joanmoncho/ManejoFichero/package-info.java b/src/com/joanmoncho/ManejoFichero/package-info.java new file mode 100644 index 0000000..1e05233 --- /dev/null +++ b/src/com/joanmoncho/ManejoFichero/package-info.java @@ -0,0 +1 @@ +package com.joanmoncho.ManejoFichero; \ No newline at end of file