diff --git a/doc/api/fs.md b/doc/api/fs.md index 78b7b3af2f8d36..33d1d072e0e05b 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -284,7 +284,7 @@ synchronous use libuv's threadpool, which can have surprising and negative performance implications for some applications. See the [`UV_THREADPOOL_SIZE`][] documentation for more information. -## Class fs.Dir +## Class `fs.Dir` @@ -306,7 +306,7 @@ async function print(path) { print('./').catch(console.error); ``` -### dir.close() +### `dir.close()` @@ -319,7 +319,7 @@ Subsequent reads will result in errors. A `Promise` is returned that will be resolved after the resource has been closed. -### dir.close(callback) +### `dir.close(callback)` @@ -332,7 +332,7 @@ Subsequent reads will result in errors. The `callback` will be called after the resource handle has been closed. -### dir.closeSync() +### `dir.closeSync()` @@ -340,7 +340,7 @@ added: v12.12.0 Synchronously close the directory's underlying resource handle. Subsequent reads will result in errors. -### dir.path +### `dir.path` @@ -350,7 +350,7 @@ added: v12.12.0 The read-only path of this directory as was provided to [`fs.opendir()`][], [`fs.opendirSync()`][], or [`fsPromises.opendir()`][]. -### dir.read() +### `dir.read()` @@ -368,7 +368,7 @@ provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory may or may not be included in the iteration results. -### dir.read(callback) +### `dir.read(callback)` @@ -388,7 +388,7 @@ provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory may or may not be included in the iteration results. -### dir.readSync() +### `dir.readSync()` @@ -405,7 +405,7 @@ provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory may or may not be included in the iteration results. -### dir\[Symbol.asyncIterator\]() +### `dir[Symbol.asyncIterator]()` @@ -425,7 +425,7 @@ provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory may or may not be included in the iteration results. -## Class: fs.Dirent +## Class: `fs.Dirent` @@ -437,7 +437,7 @@ Additionally, when [`fs.readdir()`][] or [`fs.readdirSync()`][] is called with the `withFileTypes` option set to `true`, the resulting array is filled with `fs.Dirent` objects, rather than strings or `Buffers`. -### dirent.isBlockDevice() +### `dirent.isBlockDevice()` @@ -446,7 +446,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a block device. -### dirent.isCharacterDevice() +### `dirent.isCharacterDevice()` @@ -455,7 +455,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a character device. -### dirent.isDirectory() +### `dirent.isDirectory()` @@ -465,7 +465,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a file system directory. -### dirent.isFIFO() +### `dirent.isFIFO()` @@ -475,7 +475,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a first-in-first-out (FIFO) pipe. -### dirent.isFile() +### `dirent.isFile()` @@ -484,7 +484,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a regular file. -### dirent.isSocket() +### `dirent.isSocket()` @@ -493,7 +493,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a socket. -### dirent.isSymbolicLink() +### `dirent.isSymbolicLink()` @@ -502,7 +502,7 @@ added: v10.10.0 Returns `true` if the `fs.Dirent` object describes a symbolic link. -### dirent.name +### `dirent.name` @@ -513,7 +513,7 @@ The file name that this `fs.Dirent` object refers to. The type of this value is determined by the `options.encoding` passed to [`fs.readdir()`][] or [`fs.readdirSync()`][]. -## Class: fs.FSWatcher +## Class: `fs.FSWatcher` @@ -526,7 +526,7 @@ object. All `fs.FSWatcher` objects emit a `'change'` event whenever a specific watched file is modified. -### Event: 'change' +### Event: `'change'` @@ -552,7 +552,7 @@ fs.watch('./tmp', { encoding: 'buffer' }, (eventType, filename) => { }); ``` -### Event: 'close' +### Event: `'close'` @@ -560,7 +560,7 @@ added: v10.0.0 Emitted when the watcher stops watching for changes. The closed `fs.FSWatcher` object is no longer usable in the event handler. -### Event: 'error' +### Event: `'error'` @@ -570,7 +570,7 @@ added: v0.5.8 Emitted when an error occurs while watching the file. The errored `fs.FSWatcher` object is no longer usable in the event handler. -### watcher.close() +### `watcher.close()` @@ -578,7 +578,7 @@ added: v0.5.8 Stop watching for changes on the given `fs.FSWatcher`. Once stopped, the `fs.FSWatcher` object is no longer usable. -## Class: fs.ReadStream +## Class: `fs.ReadStream` @@ -588,14 +588,14 @@ added: v0.1.93 A successful call to `fs.createReadStream()` will return a new `fs.ReadStream` object. -### Event: 'close' +### Event: `'close'` Emitted when the `fs.ReadStream`'s underlying file descriptor has been closed. -### Event: 'open' +### Event: `'open'` @@ -604,7 +604,7 @@ added: v0.1.93 Emitted when the `fs.ReadStream`'s file descriptor has been opened. -### Event: 'ready' +### Event: `'ready'` @@ -613,7 +613,7 @@ Emitted when the `fs.ReadStream` is ready to be used. Fires immediately after `'open'`. -### readStream.bytesRead +### `readStream.bytesRead` @@ -622,7 +622,7 @@ added: v6.4.0 The number of bytes that have been read so far. -### readStream.path +### `readStream.path` @@ -634,7 +634,7 @@ argument to `fs.createReadStream()`. If `path` is passed as a string, then `readStream.path` will be a string. If `path` is passed as a `Buffer`, then `readStream.path` will be a `Buffer`. -### readStream.pending +### `readStream.pending` @@ -644,7 +644,7 @@ added: v11.2.0 This property is `true` if the underlying file has not been opened yet, i.e. before the `'ready'` event is emitted. -## Class: fs.Stats +## Class: `fs.Stats` @@ -720,7 +720,7 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a block device. -### stats.isCharacterDevice() +### `stats.isCharacterDevice()` @@ -729,7 +729,7 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a character device. -### stats.isDirectory() +### `stats.isDirectory()` @@ -738,7 +738,7 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a file system directory. -### stats.isFIFO() +### `stats.isFIFO()` @@ -748,7 +748,7 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a first-in-first-out (FIFO) pipe. -### stats.isFile() +### `stats.isFile()` @@ -757,7 +757,7 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a regular file. -### stats.isSocket() +### `stats.isSocket()` @@ -766,7 +766,7 @@ added: v0.1.10 Returns `true` if the `fs.Stats` object describes a socket. -### stats.isSymbolicLink() +### `stats.isSymbolicLink()` @@ -777,67 +777,67 @@ Returns `true` if the `fs.Stats` object describes a symbolic link. This method is only valid when using [`fs.lstat()`][]. -### stats.dev +### `stats.dev` * {number|bigint} The numeric identifier of the device containing the file. -### stats.ino +### `stats.ino` * {number|bigint} The file system specific "Inode" number for the file. -### stats.mode +### `stats.mode` * {number|bigint} A bit-field describing the file type and mode. -### stats.nlink +### `stats.nlink` * {number|bigint} The number of hard-links that exist for the file. -### stats.uid +### `stats.uid` * {number|bigint} The numeric user identifier of the user that owns the file (POSIX). -### stats.gid +### `stats.gid` * {number|bigint} The numeric group identifier of the group that owns the file (POSIX). -### stats.rdev +### `stats.rdev` * {number|bigint} A numeric device identifier if the file is considered "special". -### stats.size +### `stats.size` * {number|bigint} The size of the file in bytes. -### stats.blksize +### `stats.blksize` * {number|bigint} The file system block size for i/o operations. -### stats.blocks +### `stats.blocks` * {number|bigint} The number of blocks allocated for this file. -### stats.atimeMs +### `stats.atimeMs` @@ -847,7 +847,7 @@ added: v8.1.0 The timestamp indicating the last time this file was accessed expressed in milliseconds since the POSIX Epoch. -### stats.mtimeMs +### `stats.mtimeMs` @@ -857,7 +857,7 @@ added: v8.1.0 The timestamp indicating the last time this file was modified expressed in milliseconds since the POSIX Epoch. -### stats.ctimeMs +### `stats.ctimeMs` @@ -867,7 +867,7 @@ added: v8.1.0 The timestamp indicating the last time the file status was changed expressed in milliseconds since the POSIX Epoch. -### stats.birthtimeMs +### `stats.birthtimeMs` @@ -877,7 +877,7 @@ added: v8.1.0 The timestamp indicating the creation time of this file expressed in milliseconds since the POSIX Epoch. -### stats.atimeNs +### `stats.atimeNs` @@ -889,7 +889,7 @@ the object. The timestamp indicating the last time this file was accessed expressed in nanoseconds since the POSIX Epoch. -### stats.mtimeNs +### `stats.mtimeNs` @@ -901,7 +901,7 @@ the object. The timestamp indicating the last time this file was modified expressed in nanoseconds since the POSIX Epoch. -### stats.ctimeNs +### `stats.ctimeNs` @@ -913,7 +913,7 @@ the object. The timestamp indicating the last time the file status was changed expressed in nanoseconds since the POSIX Epoch. -### stats.birthtimeNs +### `stats.birthtimeNs` @@ -925,7 +925,7 @@ the object. The timestamp indicating the creation time of this file expressed in nanoseconds since the POSIX Epoch. -### stats.atime +### `stats.atime` @@ -934,7 +934,7 @@ added: v0.11.13 The timestamp indicating the last time this file was accessed. -### stats.mtime +### `stats.mtime` @@ -943,7 +943,7 @@ added: v0.11.13 The timestamp indicating the last time this file was modified. -### stats.ctime +### `stats.ctime` @@ -952,7 +952,7 @@ added: v0.11.13 The timestamp indicating the last time the file status was changed. -### stats.birthtime +### `stats.birthtime` @@ -1001,21 +1001,21 @@ The times in the stat object have the following semantics: Prior to Node.js 0.12, the `ctime` held the `birthtime` on Windows systems. As of 0.12, `ctime` is not "creation time", and on Unix systems, it never was. -## Class: fs.WriteStream +## Class: `fs.WriteStream` * Extends {stream.Writable} -### Event: 'close' +### Event: `'close'` Emitted when the `WriteStream`'s underlying file descriptor has been closed. -### Event: 'open' +### Event: `'open'` @@ -1024,7 +1024,7 @@ added: v0.1.93 Emitted when the `WriteStream`'s file is opened. -### Event: 'ready' +### Event: `'ready'` @@ -1033,7 +1033,7 @@ Emitted when the `fs.WriteStream` is ready to be used. Fires immediately after `'open'`. -### writeStream.bytesWritten +### `writeStream.bytesWritten` @@ -1041,7 +1041,7 @@ added: v0.4.7 The number of bytes written so far. Does not include data that is still queued for writing. -### writeStream.path +### `writeStream.path` @@ -1051,7 +1051,7 @@ argument to [`fs.createWriteStream()`][]. If `path` is passed as a string, then `writeStream.path` will be a string. If `path` is passed as a `Buffer`, then `writeStream.path` will be a `Buffer`. -### writeStream.pending +### `writeStream.pending` @@ -1061,7 +1061,7 @@ added: v11.2.0 This property is `true` if the underlying file has not been opened yet, i.e. before the `'ready'` event is emitted. -## fs.access(path\[, mode\], callback) +## `fs.access(path[, mode], callback)` @@ -1542,7 +1542,7 @@ added: v0.1.21 Synchronous close(2). Returns `undefined`. -## fs.constants +## `fs.constants` * {Object} @@ -1550,7 +1550,7 @@ Returns an object containing commonly used constants for file system operations. The specific constants currently defined are described in [FS Constants][]. -## fs.copyFile(src, dest\[, flags\], callback) +## `fs.copyFile(src, dest[, flags], callback)` @@ -1600,7 +1600,7 @@ const { COPYFILE_EXCL } = fs.constants; fs.copyFile('source.txt', 'destination.txt', COPYFILE_EXCL, callback); ``` -## fs.copyFileSync(src, dest\[, flags\]) +## `fs.copyFileSync(src, dest[, flags])` @@ -1646,7 +1646,7 @@ const { COPYFILE_EXCL } = fs.constants; fs.copyFileSync('source.txt', 'destination.txt', COPYFILE_EXCL); ``` -## fs.createReadStream(path\[, options\]) +## `fs.createReadStream(path[, options])` @@ -1970,7 +1970,7 @@ added: v0.4.7 Synchronous fchmod(2). Returns `undefined`. -## fs.fchown(fd, uid, gid, callback) +## `fs.fchown(fd, uid, gid, callback)` @@ -2004,7 +2004,7 @@ added: v0.4.7 Synchronous fchown(2). Returns `undefined`. -## fs.fdatasync(fd, callback) +## `fs.fdatasync(fd, callback)` @@ -2034,7 +2034,7 @@ added: v0.1.96 Synchronous fdatasync(2). Returns `undefined`. -## fs.fstat(fd\[, options\], callback) +## `fs.fstat(fd[, options], callback)` @@ -2112,7 +2112,7 @@ added: v0.1.96 Synchronous fsync(2). Returns `undefined`. -## fs.ftruncate(fd\[, len\], callback) +## `fs.ftruncate(fd[, len], callback)` @@ -2189,7 +2189,7 @@ Returns `undefined`. For detailed information, see the documentation of the asynchronous version of this API: [`fs.ftruncate()`][]. -## fs.futimes(fd, atime, mtime, callback) +## `fs.futimes(fd, atime, mtime, callback)` @@ -2269,7 +2269,7 @@ deprecated: v0.4.7 Synchronous lchmod(2). Returns `undefined`. -## fs.lchown(path, uid, gid, callback) +## `fs.lchown(path, uid, gid, callback)` @@ -2582,7 +2582,7 @@ this API: [`fs.mkdtemp()`][]. The optional `options` argument can be a string specifying an encoding, or an object with an `encoding` property specifying the character encoding to use. -## fs.open(path\[, flags\[, mode\]\], callback) +## `fs.open(path[, flags[, mode]], callback)` @@ -2642,7 +2642,7 @@ and cleaning up the directory. The `encoding` option sets the encoding for the `path` while opening the directory and subsequent read operations. -## fs.opendirSync(path\[, options\]) +## `fs.opendirSync(path[, options])` @@ -2660,7 +2660,7 @@ and cleaning up the directory. The `encoding` option sets the encoding for the `path` while opening the directory and subsequent read operations. -## fs.openSync(path\[, flags, mode\]) +## `fs.openSync(path[, flags, mode])` @@ -3094,7 +3094,7 @@ On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on `/proc` in order for this function to work. Glibc does not have this restriction. -## fs.realpathSync(path\[, options\]) +## `fs.realpathSync(path[, options])` @@ -3147,7 +3147,7 @@ On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on `/proc` in order for this function to work. Glibc does not have this restriction. -## fs.rename(oldPath, newPath, callback) +## `fs.rename(oldPath, newPath, callback)` @@ -3522,7 +3522,7 @@ passed as the first argument. In this case, `fs.ftruncateSync()` is called. Passing a file descriptor is deprecated and may result in an error being thrown in the future. -## fs.unlink(path, callback) +## `fs.unlink(path, callback)` @@ -3594,7 +3594,7 @@ Using [`fs.watch()`][] is more efficient than `fs.watchFile()` and `fs.unwatchFile()`. `fs.watch()` should be used instead of `fs.watchFile()` and `fs.unwatchFile()` when possible. -## fs.utimes(path, atime, mtime, callback) +## `fs.utimes(path, atime, mtime, callback)` @@ -4139,7 +4139,7 @@ On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -## fs.writevSync(fd, buffers\[, position\]) +## `fs.writevSync(fd, buffers[, position])` @@ -4152,13 +4152,13 @@ added: v12.9.0 For detailed information, see the documentation of the asynchronous version of this API: [`fs.writev()`][]. -## fs Promises API +## `fs` Promises API The `fs.promises` API provides an alternative set of asynchronous file system methods that return `Promise` objects rather than using callbacks. The API is accessible via `require('fs').promises`. -### class: FileHandle +### class: `FileHandle` @@ -4183,7 +4183,7 @@ the promise-based API uses the `FileHandle` class in order to help avoid accidental leaking of unclosed file descriptors after a `Promise` is resolved or rejected. -#### filehandle.appendFile(data, options) +#### `filehandle.appendFile(data, options)` @@ -4203,7 +4203,7 @@ If `options` is a string, then it specifies the encoding. The `FileHandle` must have been opened for appending. -#### filehandle.chmod(mode) +#### `filehandle.chmod(mode)` @@ -4214,7 +4214,7 @@ added: v10.0.0 Modifies the permissions on the file. The `Promise` is resolved with no arguments upon success. -#### filehandle.chown(uid, gid) +#### `filehandle.chown(uid, gid)` @@ -4226,7 +4226,7 @@ added: v10.0.0 Changes the ownership of the file then resolves the `Promise` with no arguments upon success. -#### filehandle.close() +#### `filehandle.close()` @@ -4250,7 +4250,7 @@ async function openAndClose() { } ``` -#### filehandle.datasync() +#### `filehandle.datasync()` @@ -4260,14 +4260,14 @@ added: v10.0.0 Asynchronous fdatasync(2). The `Promise` is resolved with no arguments upon success. -#### filehandle.fd +#### `filehandle.fd` * {number} The numeric file descriptor managed by the `FileHandle` object. -#### filehandle.read(buffer, offset, length, position) +#### `filehandle.read(buffer, offset, length, position)` @@ -4295,7 +4295,7 @@ Following successful read, the `Promise` is resolved with an object with a `bytesRead` property specifying the number of bytes read, and a `buffer` property that is a reference to the passed in `buffer` argument. -#### filehandle.readFile(options) +#### `filehandle.readFile(options)` @@ -4325,7 +4325,7 @@ If one or more `filehandle.read()` calls are made on a file handle and then a position till the end of the file. It doesn't always read from the beginning of the file. -#### filehandle.stat(\[options\]) +#### `filehandle.stat([options])` @@ -4352,7 +4352,7 @@ added: v10.0.0 Asynchronous fsync(2). The `Promise` is resolved with no arguments upon success. -#### filehandle.truncate(len) +#### `filehandle.truncate(len)` @@ -4421,7 +4421,7 @@ doTruncate().catch(console.error); The last three bytes are null bytes (`'\0'`), to compensate the over-truncation. -#### filehandle.utimes(atime, mtime) +#### `filehandle.utimes(atime, mtime)` @@ -4436,7 +4436,7 @@ then resolves the `Promise` with no arguments upon success. This function does not work on AIX versions before 7.1, it will resolve the `Promise` with an error using code `UV_ENOSYS`. -#### filehandle.write(buffer\[, offset\[, length\[, position\]\]\]) +#### `filehandle.write(buffer[, offset[, length[, position]]])` @@ -4468,7 +4468,7 @@ On Linux, positional writes do not work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -#### filehandle.write(string\[, position\[, encoding\]\]) +#### `filehandle.write(string[, position[, encoding]])` @@ -4499,7 +4499,7 @@ On Linux, positional writes do not work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -#### filehandle.writeFile(data, options) +#### `filehandle.writeFile(data, options)` @@ -4529,7 +4529,7 @@ If one or more `filehandle.write()` calls are made on a file handle and then a current position till the end of the file. It doesn't always write from the beginning of the file. -#### filehandle.writev(buffers\[, position\]) +#### `filehandle.writev(buffers[, position])` @@ -4555,7 +4555,7 @@ On Linux, positional writes don't work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file. -### fsPromises.access(path\[, mode\]) +### `fsPromises.access(path[, mode])` @@ -4590,7 +4590,7 @@ condition, since other processes may change the file's state between the two calls. Instead, user code should open/read/write the file directly and handle the error raised if the file is not accessible. -### fsPromises.appendFile(path, data\[, options\]) +### `fsPromises.appendFile(path, data[, options])` @@ -4612,7 +4612,7 @@ If `options` is a string, then it specifies the encoding. The `path` may be specified as a `FileHandle` that has been opened for appending (using `fsPromises.open()`). -### fsPromises.chmod(path, mode) +### `fsPromises.chmod(path, mode)` @@ -4624,7 +4624,7 @@ added: v10.0.0 Changes the permissions of a file then resolves the `Promise` with no arguments upon succces. -### fsPromises.chown(path, uid, gid) +### `fsPromises.chown(path, uid, gid)` @@ -4637,7 +4637,7 @@ added: v10.0.0 Changes the ownership of a file then resolves the `Promise` with no arguments upon success. -### fsPromises.copyFile(src, dest\[, flags\]) +### `fsPromises.copyFile(src, dest[, flags])` @@ -4690,7 +4690,7 @@ fsPromises.copyFile('source.txt', 'destination.txt', COPYFILE_EXCL) .catch(() => console.log('The file could not be copied')); ``` -### fsPromises.lchmod(path, mode) +### `fsPromises.lchmod(path, mode)` @@ -4702,7 +4702,7 @@ deprecated: v10.0.0 Changes the permissions on a symbolic link then resolves the `Promise` with no arguments upon success. This method is only implemented on macOS. -### fsPromises.lchown(path, uid, gid) +### `fsPromises.lchown(path, uid, gid)` @@ -4730,7 +4730,7 @@ added: v10.0.0 Asynchronous link(2). The `Promise` is resolved with no arguments upon success. -### fsPromises.lstat(path\[, options\]) +### `fsPromises.lstat(path[, options])` @@ -4769,7 +4769,7 @@ property indicating whether parent folders should be created. Calling `fsPromises.mkdir()` when `path` is a directory that exists results in a rejection only when `recursive` is false. -### fsPromises.mkdtemp(prefix\[, options\]) +### `fsPromises.mkdtemp(prefix[, options])` @@ -4800,7 +4800,7 @@ characters directly to the `prefix` string. For instance, given a directory `prefix` must end with a trailing platform-specific path separator (`require('path').sep`). -### fsPromises.open(path, flags\[, mode\]) +### `fsPromises.open(path, flags[, mode])` @@ -4858,7 +4858,7 @@ async function print(path) { print('./').catch(console.error); ``` -### fsPromises.readdir(path\[, options\]) +### `fsPromises.readdir(path[, options])` @@ -4910,7 +4910,7 @@ returned. Any specified `FileHandle` has to support reading. -### fsPromises.readlink(path\[, options\]) +### `fsPromises.readlink(path[, options])` @@ -4928,7 +4928,7 @@ object with an `encoding` property specifying the character encoding to use for the link path returned. If the `encoding` is set to `'buffer'`, the link path returned will be passed as a `Buffer` object. -### fsPromises.realpath(path\[, options\]) +### `fsPromises.realpath(path[, options])` @@ -4953,7 +4953,7 @@ On Linux, when Node.js is linked against musl libc, the procfs file system must be mounted on `/proc` in order for this function to work. Glibc does not have this restriction. -### fsPromises.rename(oldPath, newPath) +### `fsPromises.rename(oldPath, newPath)` @@ -4965,7 +4965,7 @@ added: v10.0.0 Renames `oldPath` to `newPath` and resolves the `Promise` with no arguments upon success. -### fsPromises.rmdir(path\[, options\]) +### `fsPromises.rmdir(path[, options])` @@ -5035,7 +5035,7 @@ The `type` argument is only used on Windows platforms and can be one of `'dir'`, to be absolute. When using `'junction'`, the `target` argument will automatically be normalized to absolute path. -### fsPromises.truncate(path\[, len\]) +### `fsPromises.truncate(path[, len])` @@ -5047,7 +5047,7 @@ added: v10.0.0 Truncates the `path` then resolves the `Promise` with no arguments upon success. The `path` *must* be a string or `Buffer`. -### fsPromises.unlink(path) +### `fsPromises.unlink(path)` @@ -5058,7 +5058,7 @@ added: v10.0.0 Asynchronous unlink(2). The `Promise` is resolved with no arguments upon success. -### fsPromises.utimes(path, atime, mtime) +### `fsPromises.utimes(path, atime, mtime)` @@ -5078,7 +5078,7 @@ The `atime` and `mtime` arguments follow these rules: * If the value can not be converted to a number, or is `NaN`, `Infinity` or `-Infinity`, an `Error` will be thrown. -### fsPromises.writeFile(file, data\[, options\]) +### `fsPromises.writeFile(file, data[, options])`