Package org.xnio

# Interface FileSystemWatcher

All Superinterfaces:
  `AutoCloseable`, `Closeable`

public interface FileSystemWatcher extends Closeable
File system watcher service. This watcher can be used to receive notifications about a specific path.

Author:
  Stuart Douglas

## Method Summary

Modifier and Type
Method
Description
`void`
`unwatchPath(File file, FileChangeCallback callback)`
Stop watching a path.
`void`
`watchPath(File file, FileChangeCallback callback)`
Watch the given path recursively, and invoke the callback when a change is made.

### Methods inherited from interface java.io.Closeable

`close`

## Method Details

### watchPath

void watchPath(File file, FileChangeCallback callback)
Watch the given path recursively, and invoke the callback when a change is made.

Parameters:
  `file` - The path to watch
  `callback` - The callback

### unwatchPath

void unwatchPath(File file, FileChangeCallback callback)
Stop watching a path.

Parameters:
  `file` - the path
  `callback` - the callback