I want to use
File f = new File(\"C:\\\\\");
to make an ArrayList with the contents of the folder.
I am not very good with buffered
Streams are fast and very easy to read:
final Path rootPath = Paths.get("/tmp");
// All entries Path objects
ArrayList all = Files
.list(rootPath)
.collect(Collectors.toCollection(ArrayList::new));
// Only regular files at Path objects
ArrayList regularFilePaths = Files
.list(rootPath)
.filter(Files::isRegularFile)
.collect(Collectors.toCollection(ArrayList::new));
// Only regular files as String paths
ArrayList regularPathsAsString = Files
.list(rootPath)
.filter(Files::isRegularFile)
.map(Path::toString)
.collect(Collectors.toCollection(ArrayList::new));