Part-2 java.nio package
Topic:
- What does SimpleFileVisitor API do and when do we extend this API as part of child classes?
- What are the events that can be registered with WatchService API and how to capture these events?
- What does WatchEvent API do?
- What does WatchKey API do?
- What does WatchService API do?
- How can we search files ending with any no. of extensions using DirectoryStream API?
- What does DirectoryStream API do and when do we use this API?
- How can we search files ending with one particular extension using walkFileTree method and SimpleFileVisitor class?
- Does walkFileTree method of Files class used for recursive operations only?
- What does walkFileTree method of java.NIO.Files package do and how and when is it used?
- Why do we need to define these methods as part of a class?
- What does preVisitDirectory, postVisitDirectory, visitFile and visitFileFailed methods do and when do we define which all methods as part of these class files?
- What is the difference between FileVisitor and SimpleFileVisitor API and when do we extend which particular API?
- Which all methods of SimpleFileVisitor API can we use as part of class files for traversal operations?
- How WatchService, WatchKey and WatchEvent APIs be used together to help monitor directories or files for any change events such as creation, deletion or modification of files?
