Package name.pachler.nio.file
Class FileSystem
- java.lang.Object
-
- name.pachler.nio.file.FileSystem
-
public abstract class FileSystem extends java.lang.ObjectRepresents a file system. Use this class to instantiate a newWatchServicein a way that is source compatible with JDK7. An alternative is to useBootstrapper.newWatchService().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract WatchServicenewWatchService()Creates a newWatchServiceinstance by selecting an implementation that best fits the current platform.
Note that a watch service consumes valuable system resources.
-
-
-
Method Detail
-
newWatchService
public abstract WatchService newWatchService()
Creates a newWatchServiceinstance 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.
-
-