A cache system is implemented in the module, in order to skip this cache system and directly make a request for get result in real time please add the skip option
{
markdown: 'https://github.com/nodejs/node/blob/main/doc/api/fs.md',
sourceCode: 'https://github.com/nodejs/node/blob/v16.16.0/lib/fs.js',
name: { short: 'fs', long: 'File system' },
introducedIn: 'v0.10.0',
stability: { text: 'Stable', number: 2 },
description: '**Source Code:** [lib/fs.js](https://github.com/nodejs/node/blob/v16.16.0/lib/fs.js)\n' +
'\n' +
'The `fs` module enables interacting with the file system in a way modeled on standard POSIX functions.\n' +
'\n' +
'To use the promise-based APIs:\n' +
'\n' +
'```js\n' +
"import * as fs from 'fs/promises';\n" +
'```\n' +
'```js\n' +
"const fs = require('fs/promises');\n" +
'```\n' +
'\n' +
'To use the callback and sync APIs:\n' +
'\n' +
'```js\n' +
"import * as fs from 'fs';\n" +
'```\n' +
'```js\n' +
"const fs = require('fs');\n" +
'```\n' +
'\n' +
'All file system operations have synchronous, callback, and promise-based forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).',
methods: [
{
function: 'dir.readSync()',
name: 'readSync',
description: 'Synchronously read the next directory entry as an [<fs.Dirent>](fs.html#class-fsdirent). See the POSIX [`readdir(3)`](http://man7.org/linux/man-pages/man3/readdir.3.html) documentation for more detail.\n' +
'\n' +
'If there are no more directory entries to read, `null` will be returned.\n' +
'\n' +
"Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms. Entries added or removed while iterating over the directory might not be included in the iteration results.",
sourceLink: null,
params: [],
return: [Object],
meta: [Object],
stability: [Object]
},
{
function: 'fs.readSync(fd, buffer[, options])',
name: 'readSync',
description: 'Returns the number of `bytesRead`.\n' +
'\n' +
'Similar to the above `fs.readSync` function, this version takes an optional `options` object. If no `options` object is specified, it will default with the above values.\n' +
'\n' +
'For detailed information, see the documentation of the asynchronous version of this API: [`fs.read()`](fs.html#fsreadfd-buffer-offset-length-position-callback).',
sourceLink: 'https://github.com/nodejs/node/blob/c98901f00d4b31a9a4b14d161177a7d9a64e36f7/lib/fs.js#L684',
params: [Array],
return: [Object],
meta: [Object],
stability: [Object]
},
{
function: 'fs.readSync(fd, buffer, offset, length, position)',
name: 'readSync',
description: 'Returns the number of `bytesRead`.\n' +
'\n' +
'For detailed information, see the documentation of the asynchronous version of this API: [`fs.read()`](fs.html#fsreadfd-buffer-offset-length-position-callback).',
sourceLink: 'https://github.com/nodejs/node/blob/c98901f00d4b31a9a4b14d161177a7d9a64e36f7/lib/fs.js#L684',
params: [Array],
return: [Object],
meta: [Object],
stability: [Object]
}
]
}