Node fs.unwatchFile function | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
unwatchFileFunwatchFile
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
unwatchFileFunwatchFile
function
fs.unwatchFilefunction
unwatchFile(filename:
PathLike,listener?:
StatsListener): void;
Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed, effectively stopping watching of filename.
Calling fs.unwatchFile() with a filename that is not being watched is a no-op, not an error.
Using watch is more efficient than fs.watchFile() and fs.unwatchFile(). fs.watch() should be used instead of fs.watchFile() and fs.unwatchFile() when possible.
@param listener
Optional, a listener previously attached using fs.watchFile()
function
unwatchFile(filename:
PathLike,listener?:
BigIntStatsListener): void;
Stop watching for changes on filename. If listener is specified, only that particular listener is removed. Otherwise, all listeners are removed, effectively stopping watching of filename.
Calling fs.unwatchFile() with a filename that is not being watched is a no-op, not an error.
Using watch is more efficient than fs.watchFile() and fs.unwatchFile(). fs.watch() should be used instead of fs.watchFile() and fs.unwatchFile() when possible.
@param listener
Optional, a listener previously attached using fs.watchFile()
Referenced typestype
PathLike = string |
Buffer |
URLValid types for path values in "fs".
type
StatsListener = (curr:
Stats, prev:
Stats) => voidtype
BigIntStatsListener = (curr:
BigIntStats, prev:
BigIntStats) => void
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →