# Sandbox.FolderWatcher

Watches a folder on disk for changes - the shape of `T:System.IO.FileSystemWatcher`, with the
same events, watched the way the platform can afford (`T:Sandbox.PhysicalWatch`):
Linux (`FolderWatcher.Linux.cs`): a watch on the trees the mounted filesystems already
watch, so it costs no inotify instance of its own when one covers it.macOS (`FolderWatcher.MacOS.cs`): an FSEvents stream, which starts in well under a
millisecond where `T:System.IO.FileSystemWatcher` takes 50-100 ms. FSEvents doesn't pair the two
ends of a rename, so there a rename arrives as `E:Sandbox.FolderWatcher.Deleted` for the old path and
`E:Sandbox.FolderWatcher.Created` for the new one, never `E:Sandbox.FolderWatcher.Renamed`.Windows: `T:System.IO.FileSystemWatcher`.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Filesystem`
- Modifiers: sealed

## Constructors

- [`FolderWatcher`](/api/Sandbox.FolderWatcher/.ctor)

## Properties

- [`EnableRaisingEvents`](/api/Sandbox.FolderWatcher/EnableRaisingEvents)
- [`IncludeSubdirectories`](/api/Sandbox.FolderWatcher/IncludeSubdirectories): Whether changes anywhere under the folder count, or only its direct contents.
- [`Path`](/api/Sandbox.FolderWatcher/Path): The folder to watch. Changing it while enabled moves the watch.

## Methods

- [`Dispose`](/api/Sandbox.FolderWatcher/Dispose)
