Package name.pachler.nio.file

# Class Path

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

All Implemented Interfaces:
  `Watchable`

Direct Known Subclasses:
  `PathImpl`

public abstract class Path extends Object implements Watchable
This class represents an abstract Path object that a WatchService can operate on.
Note that Path is a new way of representing file system paths in JDK7 and is included here to provide source level compatibility. This implementation only uses it as a wrapper for java.io.File. To create a new Path instance, either use the Bootstrapper.newPath() or Paths.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Path()`

## Method Summary

Modifier and Type
Method
Description
`abstract boolean`
`equals(Object obj)`
`abstract int`
`hashCode()`
`abstract WatchKey`
`register(WatchService watcher, WatchEvent.Kind<?>... events)`
Registers the file system path (a directory) with the given WatchService and provides a WatchKey as a handle for that registration.
`abstract WatchKey`
`register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers)`
Registers the file system path (a directory) with the given `WatchService`and provides a WatchKey as a handle for that registration.
`abstract Path`
`resolve(Path other)`
`abstract String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Path

protected Path()

## Method Details

### equals

public abstract boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### hashCode

public abstract int hashCode()

Overrides:
  `hashCode` in class `Object`

### register

public abstract WatchKey register(WatchService watcher, WatchEvent.Kind<?>... events) throws 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`
Throws:
  `IOException`
See Also:
  - `register(name.pachler.nio.file.WatchService, name.pachler.nio.file.WatchEvent.Kind<?>[], name.pachler.nio.file.WatchEvent.Modifier[])`

### register

public abstract WatchKey register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) throws 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. The events and modifier lists determine the events that the `WatchService` will report.
If a path instance is passed in that represents the same file system object that has been specified in a previous call to this method with the same `WatchService`, the same `WatchKey` will be returned. In this case, the `WatchKey`'s watch settings are altered to match the new event and modifier lists. Note that such changes may result in `StandardWatchEventKind.OVERFLOW` events to be reported on some platforms.
Not all event kinds and modifiers defined in `StandardWatchEventKind`, `ExtendedWatchEventKind` and `ExtendedWatchEventModifier` may be supported on a target platform (typically though, in this implementation, all event kinds defined in `StandardWatchEventKind` are always supported).

Specified by:
  `register` in interface `Watchable`
Parameters:
  `watcher` - a valid `WatchService` instance.
  `events` - The events to register for. The event kinds defined in `StandardWatchEventKind`and `ExtendedWatchEventKind` define valid event kinds that can be passed in here. Not that not all event kinds may be supported on a given platform, so see the documentation of a specific event kind.
  `modifiers` - The event modifiers to use when registering.
  invalid reference

      WatchEvent$Modifier

  s define special behaviour that's expected from the `WatchService`. Note that some event modifiers may not be supported on a given platform; see the specific modifier for details.
Returns:
  a new `WatchKey` that represents the registration.
Throws:
  `IOException`
See Also:
  - `StandardWatchEventKind`
  - `ExtendedWatchEventKind`
  - `ExtendedWatchEventModifier`

### resolve

public abstract Path resolve(Path other)

### toString

public abstract String toString()

Overrides:
  `toString` in class `Object`