name.pachler.nio.file
Class FileSystem

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

public abstract class FileSystem
extends java.lang.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 Summary
abstract  WatchService newWatchService()
          Creates a new WatchService instance by selecting an implementation that best fits the current platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.