"வணக்கம், அமிகோ! உங்களுக்காக நான் இரண்டு சுவாரஸ்யமான பணிகளைக் கொண்டு வந்துள்ளேன்."
"இன்டெல்லிஜே ஐடியாவில் மட்டுமே அவற்றை முடிக்க முடியும். இந்த சுவாரஸ்யமான நிலைமைகளைப் பாருங்கள்..."
28
பணி
Java Collections, நிலை 1, பாடம் 2
பூட்டப்பட்டது
Iterating through a file tree
1. The main method is passed two arguments as inputs.
The first argument is path, which is the path to the directory; the second is resultFileAbsolutePath, which is the name (full path) of an existing file that will store the result.
14
பணி
Java Collections, நிலை 1, பாடம் 2
பூட்டப்பட்டது
Find all the files
Implement the getFileTree method, which must create a list of all of the files, including nested files.
Don't use recursion.
Return a list of the paths to all the found files. Don't return paths to directories.
The path must be absolute.
28
பணி
Java Collections, நிலை 1, பாடம் 2
பூட்டப்பட்டது
Advanced file search
Let's implement a configurable file search within a directory. Look over the java.nio.file.FileVisitor interface and its superclass's implementation java.nio.file.SimpleFileVisitor.