void (File dir) { File[] files = dir.listFiles(); if (files == null) return; for (File file : files) { System.out.println(file.getAbsolutePath()); if (file.isDirectory()) { printDirectoryContent(file); } } }