Class FileSystem

java.lang.Object
name.pachler.nio.file.FileSystem

public abstract class FileSystem extends Object
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 Details

    • newWatchService

      public abstract WatchService newWatchService()
      Creates a new WatchService 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.