|
@ -121,8 +121,8 @@ The object itself emits these events: |
|
|
added: v0.5.8 |
|
|
added: v0.5.8 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `eventType` {String} The type of fs change |
|
|
* `eventType` {string} The type of fs change |
|
|
* `filename` {String | Buffer} The filename that changed (if relevant/available) |
|
|
* `filename` {string | Buffer} The filename that changed (if relevant/available) |
|
|
|
|
|
|
|
|
Emitted when something changes in a watched directory or file. |
|
|
Emitted when something changes in a watched directory or file. |
|
|
See more details in [`fs.watch()`][]. |
|
|
See more details in [`fs.watch()`][]. |
|
@ -318,7 +318,7 @@ argument to `fs.createWriteStream()`. If `path` is passed as a string, then |
|
|
added: v0.11.15 |
|
|
added: v0.11.15 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
@ -439,7 +439,7 @@ process. |
|
|
added: v0.11.15 |
|
|
added: v0.11.15 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
|
|
|
|
|
|
Synchronous version of [`fs.access()`][]. This throws if any accessibility |
|
|
Synchronous version of [`fs.access()`][]. This throws if any accessibility |
|
@ -461,12 +461,12 @@ changes: |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `file` {String | Buffer | Number} filename or file descriptor |
|
|
* `file` {string | Buffer | Number} filename or file descriptor |
|
|
* `data` {String | Buffer} |
|
|
* `data` {string | Buffer} |
|
|
* `options` {Object | String} |
|
|
* `options` {Object | String} |
|
|
* `encoding` {String | Null} default = `'utf8'` |
|
|
* `encoding` {string | Null} default = `'utf8'` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `flag` {String} default = `'a'` |
|
|
* `flag` {string} default = `'a'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronously append data to a file, creating the file if it does not yet exist. |
|
|
Asynchronously append data to a file, creating the file if it does not yet exist. |
|
@ -504,12 +504,12 @@ changes: |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `file` {String | Buffer | Number} filename or file descriptor |
|
|
* `file` {string | Buffer | Number} filename or file descriptor |
|
|
* `data` {String | Buffer} |
|
|
* `data` {string | Buffer} |
|
|
* `options` {Object | String} |
|
|
* `options` {Object | String} |
|
|
* `encoding` {String | Null} default = `'utf8'` |
|
|
* `encoding` {string | Null} default = `'utf8'` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `flag` {String} default = `'a'` |
|
|
* `flag` {string} default = `'a'` |
|
|
|
|
|
|
|
|
The synchronous version of [`fs.appendFile()`][]. Returns `undefined`. |
|
|
The synchronous version of [`fs.appendFile()`][]. Returns `undefined`. |
|
|
|
|
|
|
|
@ -523,7 +523,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
@ -535,7 +535,7 @@ to the completion callback. |
|
|
added: v0.6.7 |
|
|
added: v0.6.7 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
|
|
|
|
|
|
Synchronous chmod(2). Returns `undefined`. |
|
|
Synchronous chmod(2). Returns `undefined`. |
|
@ -550,7 +550,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `uid` {Integer} |
|
|
* `uid` {Integer} |
|
|
* `gid` {Integer} |
|
|
* `gid` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
@ -563,7 +563,7 @@ to the completion callback. |
|
|
added: v0.1.97 |
|
|
added: v0.1.97 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `uid` {Integer} |
|
|
* `uid` {Integer} |
|
|
* `gid` {Integer} |
|
|
* `gid` {Integer} |
|
|
|
|
|
|
|
@ -612,13 +612,13 @@ changes: |
|
|
description: The passed `options` object can be a string now. |
|
|
description: The passed `options` object can be a string now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `flags` {String} |
|
|
* `flags` {string} |
|
|
* `encoding` {String} |
|
|
* `encoding` {string} |
|
|
* `fd` {Integer} |
|
|
* `fd` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `autoClose` {Boolean} |
|
|
* `autoClose` {boolean} |
|
|
* `start` {Integer} |
|
|
* `start` {Integer} |
|
|
* `end` {Integer} |
|
|
* `end` {Integer} |
|
|
|
|
|
|
|
@ -683,13 +683,13 @@ changes: |
|
|
description: The passed `options` object can be a string now. |
|
|
description: The passed `options` object can be a string now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `flags` {String} |
|
|
* `flags` {string} |
|
|
* `defaultEncoding` {String} |
|
|
* `defaultEncoding` {string} |
|
|
* `fd` {Integer} |
|
|
* `fd` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `autoClose` {Boolean} |
|
|
* `autoClose` {boolean} |
|
|
* `start` {Integer} |
|
|
* `start` {Integer} |
|
|
|
|
|
|
|
|
Returns a new [`WriteStream`][] object. (See [Writable Stream][]). |
|
|
Returns a new [`WriteStream`][] object. (See [Writable Stream][]). |
|
@ -733,7 +733,7 @@ deprecated: v1.0.0 |
|
|
|
|
|
|
|
|
> Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. |
|
|
> Stability: 0 - Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead. |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Test whether or not the given path exists by checking with the file system. |
|
|
Test whether or not the given path exists by checking with the file system. |
|
@ -834,7 +834,7 @@ process. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous version of [`fs.exists()`][]. |
|
|
Synchronous version of [`fs.exists()`][]. |
|
|
Returns `true` if the file exists, `false` otherwise. |
|
|
Returns `true` if the file exists, `false` otherwise. |
|
@ -1092,7 +1092,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
@ -1106,7 +1106,7 @@ Only available on Mac OS X. |
|
|
deprecated: v0.4.7 |
|
|
deprecated: v0.4.7 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
|
|
|
|
|
|
Synchronous lchmod(2). Returns `undefined`. |
|
|
Synchronous lchmod(2). Returns `undefined`. |
|
@ -1121,7 +1121,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `uid` {Integer} |
|
|
* `uid` {Integer} |
|
|
* `gid` {Integer} |
|
|
* `gid` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
@ -1134,7 +1134,7 @@ to the completion callback. |
|
|
deprecated: v0.4.7 |
|
|
deprecated: v0.4.7 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `uid` {Integer} |
|
|
* `uid` {Integer} |
|
|
* `gid` {Integer} |
|
|
* `gid` {Integer} |
|
|
|
|
|
|
|
@ -1150,8 +1150,8 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `existingPath` {String | Buffer} |
|
|
* `existingPath` {string | Buffer} |
|
|
* `newPath` {String | Buffer} |
|
|
* `newPath` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous link(2). No arguments other than a possible exception are given to |
|
|
Asynchronous link(2). No arguments other than a possible exception are given to |
|
@ -1162,8 +1162,8 @@ the completion callback. |
|
|
added: v0.1.31 |
|
|
added: v0.1.31 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `existingPath` {String | Buffer} |
|
|
* `existingPath` {string | Buffer} |
|
|
* `newPath` {String | Buffer} |
|
|
* `newPath` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous link(2). Returns `undefined`. |
|
|
Synchronous link(2). Returns `undefined`. |
|
|
|
|
|
|
|
@ -1177,7 +1177,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous lstat(2). The callback gets two arguments `(err, stats)` where |
|
|
Asynchronous lstat(2). The callback gets two arguments `(err, stats)` where |
|
@ -1190,7 +1190,7 @@ not the file that it refers to. |
|
|
added: v0.1.30 |
|
|
added: v0.1.30 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous lstat(2). Returns an instance of [`fs.Stats`][]. |
|
|
Synchronous lstat(2). Returns an instance of [`fs.Stats`][]. |
|
|
|
|
|
|
|
@ -1204,7 +1204,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
@ -1216,7 +1216,7 @@ to the completion callback. `mode` defaults to `0o777`. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
|
|
|
|
|
|
Synchronous mkdir(2). Returns `undefined`. |
|
|
Synchronous mkdir(2). Returns `undefined`. |
|
@ -1234,9 +1234,9 @@ changes: |
|
|
description: The `callback` parameter is optional now. |
|
|
description: The `callback` parameter is optional now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `prefix` {String} |
|
|
* `prefix` {string} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Creates a unique temporary directory. |
|
|
Creates a unique temporary directory. |
|
@ -1296,9 +1296,9 @@ fs.mkdtemp(tmpDir + path.sep, (err, folder) => { |
|
|
added: v5.10.0 |
|
|
added: v5.10.0 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `prefix` {String} |
|
|
* `prefix` {string} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
|
|
|
|
|
|
The synchronous version of [`fs.mkdtemp()`][]. Returns the created |
|
|
The synchronous version of [`fs.mkdtemp()`][]. Returns the created |
|
|
folder path. |
|
|
folder path. |
|
@ -1311,8 +1311,8 @@ object with an `encoding` property specifying the character encoding to use. |
|
|
added: v0.0.2 |
|
|
added: v0.0.2 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `flags` {String | Number} |
|
|
* `flags` {string | Number} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
@ -1395,8 +1395,8 @@ fs.open('<directory>', 'a+', (err, fd) => { |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `flags` {String | Number} |
|
|
* `flags` {string | Number} |
|
|
* `mode` {Integer} |
|
|
* `mode` {Integer} |
|
|
|
|
|
|
|
|
Synchronous version of [`fs.open()`][]. Returns an integer representing the file |
|
|
Synchronous version of [`fs.open()`][]. Returns an integer representing the file |
|
@ -1415,7 +1415,7 @@ changes: |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `fd` {Integer} |
|
|
* `fd` {Integer} |
|
|
* `buffer` {String | Buffer | Uint8Array} |
|
|
* `buffer` {string | Buffer | Uint8Array} |
|
|
* `offset` {Integer} |
|
|
* `offset` {Integer} |
|
|
* `length` {Integer} |
|
|
* `length` {Integer} |
|
|
* `position` {Integer} |
|
|
* `position` {Integer} |
|
@ -1444,9 +1444,9 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous readdir(3). Reads the contents of a directory. |
|
|
Asynchronous readdir(3). Reads the contents of a directory. |
|
@ -1463,9 +1463,9 @@ the filenames returned will be passed as `Buffer` objects. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
|
|
|
|
|
|
Synchronous readdir(3). Returns an array of filenames excluding `'.'` and |
|
|
Synchronous readdir(3). Returns an array of filenames excluding `'.'` and |
|
|
`'..'`. |
|
|
`'..'`. |
|
@ -1492,10 +1492,10 @@ changes: |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `file` {String | Buffer | Integer} filename or file descriptor |
|
|
* `file` {string | Buffer | Integer} filename or file descriptor |
|
|
* `options` {Object | String} |
|
|
* `options` {Object | String} |
|
|
* `encoding` {String | Null} default = `null` |
|
|
* `encoding` {string | Null} default = `null` |
|
|
* `flag` {String} default = `'r'` |
|
|
* `flag` {string} default = `'r'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronously reads the entire contents of a file. Example: |
|
|
Asynchronously reads the entire contents of a file. Example: |
|
@ -1532,10 +1532,10 @@ changes: |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `file` {String | Buffer | Integer} filename or file descriptor |
|
|
* `file` {string | Buffer | Integer} filename or file descriptor |
|
|
* `options` {Object | String} |
|
|
* `options` {Object | String} |
|
|
* `encoding` {String | Null} default = `null` |
|
|
* `encoding` {string | Null} default = `null` |
|
|
* `flag` {String} default = `'r'` |
|
|
* `flag` {string} default = `'r'` |
|
|
|
|
|
|
|
|
Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`. |
|
|
Synchronous version of [`fs.readFile`][]. Returns the contents of the `file`. |
|
|
|
|
|
|
|
@ -1552,9 +1552,9 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous readlink(2). The callback gets two arguments `(err, |
|
|
Asynchronous readlink(2). The callback gets two arguments `(err, |
|
@ -1570,9 +1570,9 @@ the link path returned will be passed as a `Buffer` object. |
|
|
added: v0.1.31 |
|
|
added: v0.1.31 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
|
|
|
|
|
|
Synchronous readlink(2). Returns the symbolic link's string value. |
|
|
Synchronous readlink(2). Returns the symbolic link's string value. |
|
|
|
|
|
|
|
@ -1591,7 +1591,7 @@ changes: |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `fd` {Integer} |
|
|
* `fd` {Integer} |
|
|
* `buffer` {String | Buffer | Uint8Array} |
|
|
* `buffer` {string | Buffer | Uint8Array} |
|
|
* `offset` {Integer} |
|
|
* `offset` {Integer} |
|
|
* `length` {Integer} |
|
|
* `length` {Integer} |
|
|
* `position` {Integer} |
|
|
* `position` {Integer} |
|
@ -1615,9 +1615,9 @@ changes: |
|
|
description: The `cache` parameter was removed. |
|
|
description: The `cache` parameter was removed. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous realpath(3). The `callback` gets two arguments `(err, |
|
|
Asynchronous realpath(3). The `callback` gets two arguments `(err, |
|
@ -1643,9 +1643,9 @@ changes: |
|
|
description: The `cache` parameter was removed. |
|
|
description: The `cache` parameter was removed. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer}; |
|
|
* `path` {string | Buffer}; |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `encoding` {String} default = `'utf8'` |
|
|
* `encoding` {string} default = `'utf8'` |
|
|
|
|
|
|
|
|
Synchronous realpath(3). Returns the resolved path. |
|
|
Synchronous realpath(3). Returns the resolved path. |
|
|
|
|
|
|
|
@ -1666,8 +1666,8 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `oldPath` {String | Buffer} |
|
|
* `oldPath` {string | Buffer} |
|
|
* `newPath` {String | Buffer} |
|
|
* `newPath` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous rename(2). No arguments other than a possible exception are given |
|
|
Asynchronous rename(2). No arguments other than a possible exception are given |
|
@ -1678,8 +1678,8 @@ to the completion callback. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `oldPath` {String | Buffer} |
|
|
* `oldPath` {string | Buffer} |
|
|
* `newPath` {String | Buffer} |
|
|
* `newPath` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous rename(2). Returns `undefined`. |
|
|
Synchronous rename(2). Returns `undefined`. |
|
|
|
|
|
|
|
@ -1693,7 +1693,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous rmdir(2). No arguments other than a possible exception are given |
|
|
Asynchronous rmdir(2). No arguments other than a possible exception are given |
|
@ -1704,7 +1704,7 @@ to the completion callback. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous rmdir(2). Returns `undefined`. |
|
|
Synchronous rmdir(2). Returns `undefined`. |
|
|
|
|
|
|
|
@ -1718,7 +1718,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous stat(2). The callback gets two arguments `(err, stats)` where |
|
|
Asynchronous stat(2). The callback gets two arguments `(err, stats)` where |
|
@ -1739,7 +1739,7 @@ is recommended. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous stat(2). Returns an instance of [`fs.Stats`][]. |
|
|
Synchronous stat(2). Returns an instance of [`fs.Stats`][]. |
|
|
|
|
|
|
|
@ -1748,9 +1748,9 @@ Synchronous stat(2). Returns an instance of [`fs.Stats`][]. |
|
|
added: v0.1.31 |
|
|
added: v0.1.31 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `target` {String | Buffer} |
|
|
* `target` {string | Buffer} |
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `type` {String} |
|
|
* `type` {string} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous symlink(2). No arguments other than a possible exception are given |
|
|
Asynchronous symlink(2). No arguments other than a possible exception are given |
|
@ -1773,9 +1773,9 @@ It creates a symbolic link named "new-port" that points to "foo". |
|
|
added: v0.1.31 |
|
|
added: v0.1.31 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `target` {String | Buffer} |
|
|
* `target` {string | Buffer} |
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `type` {String} |
|
|
* `type` {string} |
|
|
|
|
|
|
|
|
Synchronous symlink(2). Returns `undefined`. |
|
|
Synchronous symlink(2). Returns `undefined`. |
|
|
|
|
|
|
|
@ -1789,7 +1789,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `len` {Integer} default = `0` |
|
|
* `len` {Integer} default = `0` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
@ -1802,7 +1802,7 @@ first argument. In this case, `fs.ftruncate()` is called. |
|
|
added: v0.8.6 |
|
|
added: v0.8.6 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `len` {Integer} default = `0` |
|
|
* `len` {Integer} default = `0` |
|
|
|
|
|
|
|
|
Synchronous truncate(2). Returns `undefined`. A file descriptor can also be |
|
|
Synchronous truncate(2). Returns `undefined`. A file descriptor can also be |
|
@ -1818,7 +1818,7 @@ changes: |
|
|
it will emit a deprecation warning. |
|
|
it will emit a deprecation warning. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronous unlink(2). No arguments other than a possible exception are given |
|
|
Asynchronous unlink(2). No arguments other than a possible exception are given |
|
@ -1829,7 +1829,7 @@ to the completion callback. |
|
|
added: v0.1.21 |
|
|
added: v0.1.21 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
|
|
|
|
|
|
Synchronous unlink(2). Returns `undefined`. |
|
|
Synchronous unlink(2). Returns `undefined`. |
|
|
|
|
|
|
|
@ -1838,7 +1838,7 @@ Synchronous unlink(2). Returns `undefined`. |
|
|
added: v0.1.31 |
|
|
added: v0.1.31 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `filename` {String | Buffer} |
|
|
* `filename` {string | Buffer} |
|
|
* `listener` {Function} |
|
|
* `listener` {Function} |
|
|
|
|
|
|
|
|
Stop watching for changes on `filename`. If `listener` is specified, only that |
|
|
Stop watching for changes on `filename`. If `listener` is specified, only that |
|
@ -1866,7 +1866,7 @@ changes: |
|
|
time specifiers. |
|
|
time specifiers. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `atime` {Integer} |
|
|
* `atime` {Integer} |
|
|
* `mtime` {Integer} |
|
|
* `mtime` {Integer} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
@ -1893,7 +1893,7 @@ changes: |
|
|
time specifiers. |
|
|
time specifiers. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `path` {String | Buffer} |
|
|
* `path` {string | Buffer} |
|
|
* `atime` {Integer} |
|
|
* `atime` {Integer} |
|
|
* `mtime` {Integer} |
|
|
* `mtime` {Integer} |
|
|
|
|
|
|
|
@ -1908,15 +1908,15 @@ changes: |
|
|
description: The passed `options` object will never be modified. |
|
|
description: The passed `options` object will never be modified. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `filename` {String | Buffer} |
|
|
* `filename` {string | Buffer} |
|
|
* `options` {String | Object} |
|
|
* `options` {string | Object} |
|
|
* `persistent` {Boolean} Indicates whether the process should continue to run |
|
|
* `persistent` {boolean} Indicates whether the process should continue to run |
|
|
as long as files are being watched. default = `true` |
|
|
as long as files are being watched. default = `true` |
|
|
* `recursive` {Boolean} Indicates whether all subdirectories should be |
|
|
* `recursive` {boolean} Indicates whether all subdirectories should be |
|
|
watched, or only the current directory. The applies when a directory is |
|
|
watched, or only the current directory. The applies when a directory is |
|
|
specified, and only on supported platforms (See [Caveats][]). default = |
|
|
specified, and only on supported platforms (See [Caveats][]). default = |
|
|
`false` |
|
|
`false` |
|
|
* `encoding` {String} Specifies the character encoding to be used for the |
|
|
* `encoding` {string} Specifies the character encoding to be used for the |
|
|
filename passed to the listener. default = `'utf8'` |
|
|
filename passed to the listener. default = `'utf8'` |
|
|
* `listener` {Function} |
|
|
* `listener` {Function} |
|
|
|
|
|
|
|
@ -2011,9 +2011,9 @@ fs.watch('somedir', (eventType, filename) => { |
|
|
added: v0.1.31 |
|
|
added: v0.1.31 |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `filename` {String | Buffer} |
|
|
* `filename` {string | Buffer} |
|
|
* `options` {Object} |
|
|
* `options` {Object} |
|
|
* `persistent` {Boolean} |
|
|
* `persistent` {boolean} |
|
|
* `interval` {Integer} |
|
|
* `interval` {Integer} |
|
|
* `listener` {Function} |
|
|
* `listener` {Function} |
|
|
|
|
|
|
|
@ -2109,9 +2109,9 @@ changes: |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `fd` {Integer} |
|
|
* `fd` {Integer} |
|
|
* `string` {String} |
|
|
* `string` {string} |
|
|
* `position` {Integer} |
|
|
* `position` {Integer} |
|
|
* `encoding` {String} |
|
|
* `encoding` {string} |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Write `string` to the file specified by `fd`. If `string` is not a string, then |
|
|
Write `string` to the file specified by `fd`. If `string` is not a string, then |
|
@ -2155,12 +2155,12 @@ changes: |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `file` {String | Buffer | Integer} filename or file descriptor |
|
|
* `file` {string | Buffer | Integer} filename or file descriptor |
|
|
* `data` {String | Buffer | Uint8Array} |
|
|
* `data` {string | Buffer | Uint8Array} |
|
|
* `options` {Object | String} |
|
|
* `options` {Object | String} |
|
|
* `encoding` {String | Null} default = `'utf8'` |
|
|
* `encoding` {string | Null} default = `'utf8'` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `flag` {String} default = `'w'` |
|
|
* `flag` {string} default = `'w'` |
|
|
* `callback` {Function} |
|
|
* `callback` {Function} |
|
|
|
|
|
|
|
|
Asynchronously writes data to a file, replacing the file if it already exists. |
|
|
Asynchronously writes data to a file, replacing the file if it already exists. |
|
@ -2205,12 +2205,12 @@ changes: |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
description: The `file` parameter can be a file descriptor now. |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `file` {String | Buffer | Integer} filename or file descriptor |
|
|
* `file` {string | Buffer | Integer} filename or file descriptor |
|
|
* `data` {String | Buffer | Uint8Array} |
|
|
* `data` {string | Buffer | Uint8Array} |
|
|
* `options` {Object | String} |
|
|
* `options` {Object | String} |
|
|
* `encoding` {String | Null} default = `'utf8'` |
|
|
* `encoding` {string | Null} default = `'utf8'` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `mode` {Integer} default = `0o666` |
|
|
* `flag` {String} default = `'w'` |
|
|
* `flag` {string} default = `'w'` |
|
|
|
|
|
|
|
|
The synchronous version of [`fs.writeFile()`][]. Returns `undefined`. |
|
|
The synchronous version of [`fs.writeFile()`][]. Returns `undefined`. |
|
|
|
|
|
|
|
@ -2242,9 +2242,9 @@ changes: |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
* `fd` {Integer} |
|
|
* `fd` {Integer} |
|
|
* `string` {String} |
|
|
* `string` {string} |
|
|
* `position` {Integer} |
|
|
* `position` {Integer} |
|
|
* `encoding` {String} |
|
|
* `encoding` {string} |
|
|
|
|
|
|
|
|
Synchronous versions of [`fs.write()`][]. Returns the number of bytes written. |
|
|
Synchronous versions of [`fs.write()`][]. Returns the number of bytes written. |
|
|
|
|
|
|
|
|