The FileVisitor implementation in Listing 1 should print a message for each directory and file it visits and also give the size of the files from their BasicFileAttributes.
清单 1 中 FileVisitor 的实现,应当为其访问的每个目录和文件打印消息,并给出从其 BasicFileAttributes 中获取的文件大小。
youdao