@@ -0,0 +1,1156 @@
+package week8;%0A%0Aimport java.nio.file.DirectoryStream;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.nio.file.attribute.BasicFileAttributes;%0A%0Apublic class VideoListTree %7B%0A%0A%09public static void main(String%5B%5D args) throws Exception %7B%0A%09%09Path currentPath = Paths.get(System.getProperty(%22user.dir%22));%0A%09%09listDir(currentPath, 0);%0A%09%7D%0A%09%0A%09public static void listDir(Path path, int depth) throws Exception %7B%0A%09%0A%09%09BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);%0A%09%09%0A%09%09// if directory, list the files, and traverse down iside each of those%0A%09%09if(attr.isDirectory()) %7B%0A%09%09%09%0A%09%09%09DirectoryStream%3CPath%3E paths = Files.newDirectoryStream(path);%0A%09%09%09System.out.println(spacesForDepth(depth) + %22 %3E %22 + path.getFileName());%0A%09%09%09%0A%09%09%09for(Path tempPath: paths) %7B%0A%09%09%09%09listDir(tempPath, depth + 1);%0A%09%09%09%7D%0A%09%09%09%0A%09%09%7D else %7B%0A%09%09%09System.out.println(spacesForDepth(depth) + %22 -- %22 + path.getFileName());%0A%09%09%7D%0A%09%7D%0A%09%0A%09public static String spacesForDepth(int depth) %7B%0A%09%09StringBuilder builder = new StringBuilder();%0A%09%09for(int i =0; i %3C depth; i++) %7B%0A%09%09%09builder.append(%22    %22);%0A%09%09%7D%0A%09%09return builder.toString();%0A%09%7D%0A%09%0A%09%0A%09%0A%09%0A%0A%7D%0A

Create VideoListTree.java