fin arbre

This commit is contained in:
2024-11-27 12:26:48 +01:00
parent d6a9265998
commit 85103a2222
53 changed files with 1412 additions and 239 deletions

View File

@@ -0,0 +1,27 @@
import java.io.File;
public class Repertoires {
public static void main(String[] args) {
if (args.length != 1) {
System.out.println("Usage: java Repertoires <nom_du_répertoire>");
return;
}
File racine = new File(args[0]);
System.out.println("Chemin fourni : " + racine.getAbsolutePath()); // Débogage
if (!racine.exists()) {
System.out.println("Le répertoire spécifié n'existe pas : " + racine.getAbsolutePath());
return;
}
if (!racine.isDirectory()) {
System.out.println("Le chemin spécifié n'est pas un répertoire : " + racine.getAbsolutePath());
return;
}
Noeud arbre = Noeud.construireArbre(racine);
arbre.afficher("");
}
}