Preparing search index...

    Watches a file or directory for changes and emits events when modifications occur.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    isWatching: boolean

    Indicates whether the watcher is currently active.

    onAdded: signal1<Path, void>

    Signal emitted when a file is added at the watched path.

    onModified: signal1<Path, void>

    Signal emitted when a file is modified at the watched path.

    onMoved: signal2<Path, Path, void>

    Signal emitted when a file is moved at the watched path.

    onRemoved: signal1<Path, void>

    Signal emitted when a file is removed from the watched path.

    path: Path

    The filesystem path being monitored by this watcher.

    Methods

    • Creates a new Watcher instance for the specified path.

      Parameters

      Returns Watcher

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Begins watching the configured path for filesystem events.

      Returns void

    • Stops watching the configured path for filesystem events.

      Returns void