Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft > IWatchFileSystem

IWatchFileSystem interface

Interface contract for heft plugins to use the WatchFileSystemAdapter

Signature:

export interface IWatchFileSystem 

Methods

Method

Description

getStateAndTrack(filePath)

Tells the adapter to track the specified file (or folder) as used. Returns an object containing data about the state of said file (or folder). Uses synchronous API.

getStateAndTrackAsync(filePath)

Tells the adapter to track the specified file (or folder) as used. Returns an object containing data about the state of said file (or folder). Uses promise-based API.

lstat(filePath, callback)

Asynchronous lstat. Watches the file for changes, or if it does not exist, watches to see if it is created.

lstatSync(filePath)

Synchronous lstat. Watches the file for changes, or if it does not exist, watches to see if it is created.

readdir(filePath, callback)

Asynchronous readdir. Watches the directory for changes.

readdir(filePath, options, callback)

readdirSync(filePath)

Synchronous readdir. Watches the directory for changes.

readdirSync(filePath, options)

stat(filePath, callback)

Asynchronous stat. Watches the file for changes, or if it does not exist, watches to see if it is created.

statSync(filePath)

Synchronous stat. Watches the file for changes, or if it does not exist, watches to see if it is created.