Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.FsWatcher

FsWatcher is returned by Deno.watchFs function when you start watching the file system. You can iterate over this interface to get the file system events, and also you can stop watching the file system by calling .close() method.

interface FsWatcher extends AsyncIterable<FsEvent> {
readonly rid: number;
[[Symbol.asyncIterator]](): AsyncIterableIterator<FsEvent>;
close(): void;
return?(value?: any): Promise<IteratorResult<FsEvent>>;
}

§Extends

§
AsyncIterable<FsEvent>
[src]

§Properties

§
readonly rid: number
[src]

The resource id of the FsWatcher.

§Methods

§
[[Symbol.asyncIterator]](): AsyncIterableIterator<FsEvent>
[src]
§
close(): void
[src]

Stops watching the file system and closes the watcher resource.

§
return?(value?: any): Promise<IteratorResult<FsEvent>>
[src]

Stops watching the file system and closes the watcher resource.