|
@ -437,7 +437,7 @@ The synchronous version of `fs.appendFile`. |
|
|
|
|
|
|
|
|
## fs.watchFile(filename, [options], listener) |
|
|
## fs.watchFile(filename, [options], listener) |
|
|
|
|
|
|
|
|
Stability: 2 - Unstable. Use fs.watch instead, if available. |
|
|
Stability: 2 - Unstable. Use fs.watch instead, if possible. |
|
|
|
|
|
|
|
|
Watch for changes on `filename`. The callback `listener` will be called each |
|
|
Watch for changes on `filename`. The callback `listener` will be called each |
|
|
time the file is accessed. |
|
|
time the file is accessed. |
|
@ -474,7 +474,7 @@ no-op, not an error. |
|
|
|
|
|
|
|
|
## fs.watch(filename, [options], [listener]) |
|
|
## fs.watch(filename, [options], [listener]) |
|
|
|
|
|
|
|
|
Stability: 2 - Unstable. Not available on all platforms. |
|
|
Stability: 2 - Unstable. |
|
|
|
|
|
|
|
|
Watch for changes on `filename`, where `filename` is either a file or a |
|
|
Watch for changes on `filename`, where `filename` is either a file or a |
|
|
directory. The returned object is a [fs.FSWatcher](#fs_class_fs_fswatcher). |
|
|
directory. The returned object is a [fs.FSWatcher](#fs_class_fs_fswatcher). |
|
@ -508,9 +508,12 @@ to be notified of filesystem changes. |
|
|
* On Windows systems, this feature depends on `ReadDirectoryChangesW`. |
|
|
* On Windows systems, this feature depends on `ReadDirectoryChangesW`. |
|
|
|
|
|
|
|
|
If the underlying functionality is not available for some reason, then |
|
|
If the underlying functionality is not available for some reason, then |
|
|
`fs.watch` will not be able to function. You can still use |
|
|
`fs.watch` will not be able to function. For example, watching files or |
|
|
`fs.watchFile`, which uses stat polling, but it is slower and less |
|
|
directories on network file systems (NFS, SMB, etc.) often doesn't work |
|
|
reliable. |
|
|
reliably or at all. |
|
|
|
|
|
|
|
|
|
|
|
You can still use `fs.watchFile`, which uses stat polling, but it is slower and |
|
|
|
|
|
less reliable. |
|
|
|
|
|
|
|
|
#### Filename Argument |
|
|
#### Filename Argument |
|
|
|
|
|
|
|
|