Package name.pachler.nio.file
Class FileSystem
java.lang.Object
name.pachler.nio.file.FileSystem
Represents a file system. Use this class to instantiate a new
WatchService
in a way that is source compatible with JDK7. An
alternative is to use
Bootstrapper.newWatchService()
.-
Method Summary
Modifier and TypeMethodDescriptionabstract WatchService
Creates a newWatchService
instance by selecting an implementation that best fits the current platform.
Note that a watch service consumes valuable system resources.
-
Method Details
-
newWatchService
Creates a newWatchService
instance by selecting an implementation that best fits the current platform.
Note that a watch service consumes valuable system resources. Make sure that to call WatchService.close() when you don't need it any longer; with many instances failure to do so may result in the system running out of file descriptors and degraded performance. Typically, you'll only need one such instance.- Returns:
- a new watch service instance.
-