Skip to content

Instantly share code, notes, and snippets.

@kryvoboker
Created May 22, 2020 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kryvoboker/6047eac1625ffd7831d7e13be022aa77 to your computer and use it in GitHub Desktop.
Save kryvoboker/6047eac1625ffd7831d7e13be022aa77 to your computer and use it in GitHub Desktop.
HomeWork8
public class Main {
public static void main(String[] args) {
File file = new File(".");
showKatalog(file);
}
public static void showKatalog(File folder) {
if (folder.isDirectory()) {
File[] files = folder.listFiles();
for (int i = 0; i < files.length; i++) {
showKatalog(files[i]);
}
System.out.println("Folder - " + folder.getParent());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment