Class PathImpl

  • All Implemented Interfaces:
    Watchable

    public class PathImpl
    extends Path
    This is a minimal implementation of JDK7's Path class, so all we offer here is what is required for WatchService and friends to work
    • Constructor Detail

      • PathImpl

        public PathImpl​(java.io.File file)
        This constructor does not comply with JDK7.
        Parameters:
        filere -
    • Method Detail

      • register

        public WatchKey register​(WatchService watcher,
                                 WatchEvent.Kind<?>... events)
                          throws java.io.IOException
        Description copied from interface: Watchable
        Registers the file system path (a directory) with the given WatchService and provides a WatchKey as a handle for that registration. Equivalent to calling register(watcher, events, new WatchEvent.Modifier[0]);
        Specified by:
        register in interface Watchable
        Specified by:
        register in class Path
        Throws:
        java.io.IOException
        See Also:
        Path#register(name.pachler.nio.file.WatchService, name.pachler.nio.file.WatchEvent.Kind[], name.pachler.nio.file.WatchEvent.Modifier[])
      • getFile

        public java.io.File getFile()
        This method does not exist in JDK7 and is only supplied for convenience
      • toString

        public java.lang.String toString()
        Specified by:
        toString in class Path
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in class Path
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class Path