{
  "source": "doc/api/fs.md",
  "modules": [
    {
      "textRaw": "File System",
      "name": "fs",
      "stability": 2,
      "stabilityText": "Stable",
      "desc": "<p>File I/O is provided by simple wrappers around standard POSIX functions.  To\nuse this module do <code>require(&#39;fs&#39;)</code>. All the methods have asynchronous and\nsynchronous forms.</p>\n<p>The asynchronous form always takes a completion callback as its last argument.\nThe arguments passed to the completion callback depend on the method, but the\nfirst argument is always reserved for an exception. If the operation was\ncompleted successfully, then the first argument will be <code>null</code> or <code>undefined</code>.</p>\n<p>When using the synchronous form any exceptions are immediately thrown.\nExceptions may be handled using <code>try</code>/<code>catch</code>, or they may be allowed to\nbubble up.</p>\n<p>Here is an example of the asynchronous version:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\nfs.unlink(&#39;/tmp/hello&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;successfully deleted /tmp/hello&#39;);\n});\n</code></pre>\n<p>Here is the synchronous version:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\nfs.unlinkSync(&#39;/tmp/hello&#39;);\nconsole.log(&#39;successfully deleted /tmp/hello&#39;);\n</code></pre>\n<p>With the asynchronous methods there is no guaranteed ordering. So the\nfollowing is prone to error:</p>\n<pre><code class=\"lang-js\">fs.rename(&#39;/tmp/hello&#39;, &#39;/tmp/world&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;renamed complete&#39;);\n});\nfs.stat(&#39;/tmp/world&#39;, (err, stats) =&gt; {\n  if (err) throw err;\n  console.log(`stats: ${JSON.stringify(stats)}`);\n});\n</code></pre>\n<p>It could be that <code>fs.stat</code> is executed before <code>fs.rename</code>.\nThe correct way to do this is to chain the callbacks.</p>\n<pre><code class=\"lang-js\">fs.rename(&#39;/tmp/hello&#39;, &#39;/tmp/world&#39;, (err) =&gt; {\n  if (err) throw err;\n  fs.stat(&#39;/tmp/world&#39;, (err, stats) =&gt; {\n    if (err) throw err;\n    console.log(`stats: ${JSON.stringify(stats)}`);\n  });\n});\n</code></pre>\n<p>In busy processes, the programmer is <em>strongly encouraged</em> to use the\nasynchronous versions of these calls. The synchronous versions will block\nthe entire process until they complete--halting all connections.</p>\n<p>The relative path to a filename can be used. Remember, however, that this path\nwill be relative to <code>process.cwd()</code>.</p>\n<p>While it is not recommended, most fs functions allow the callback argument to\nbe omitted, in which case a default callback is used that rethrows errors. To\nget a trace to the original call site, set the <code>NODE_DEBUG</code> environment\nvariable:</p>\n<p><em>Note</em>: Omitting the callback function on asynchronous fs functions is\ndeprecated and may result in an error being thrown in the future.</p>\n<pre><code class=\"lang-txt\">$ cat script.js\nfunction bad() {\n  require(&#39;fs&#39;).readFile(&#39;/&#39;);\n}\nbad();\n\n$ env NODE_DEBUG=fs node script.js\nfs.js:88\n        throw backtrace;\n        ^\nError: EISDIR: illegal operation on a directory, read\n    &lt;stack trace.&gt;\n</code></pre>\n<p><em>Note:</em> On Windows Node.js follows the concept of per-drive working directory.\nThis behavior can be observed when using a drive path without a backslash. For\nexample <code>fs.readdirSync(&#39;c:\\\\&#39;)</code> can potentially return a different result than\n<code>fs.readdirSync(&#39;c:&#39;)</code>. For more information, see\n<a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#fully_qualified_vs._relative_paths\">this MSDN page</a>.</p>\n",
      "modules": [
        {
          "textRaw": "WHATWG URL object support",
          "name": "whatwg_url_object_support",
          "meta": {
            "added": [
              "v7.6.0"
            ],
            "changes": []
          },
          "stability": 1,
          "stabilityText": "Experimental",
          "desc": "<p>For most <code>fs</code> module functions, the <code>path</code> or <code>filename</code> argument may be passed\nas a WHATWG <a href=\"url.html#url_the_whatwg_url_api\"><code>URL</code></a> object. Only <a href=\"url.html#url_the_whatwg_url_api\"><code>URL</code></a> objects using the <code>file:</code> protocol\nare supported.</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\nconst { URL } = require(&#39;url&#39;);\nconst fileUrl = new URL(&#39;file:///tmp/hello&#39;);\n\nfs.readFileSync(fileUrl);\n</code></pre>\n<p><em>Note</em>: <code>file:</code> URLs are always absolute paths.</p>\n<p>Using WHATWG <a href=\"url.html#url_the_whatwg_url_api\"><code>URL</code></a> objects might introduce platform-specific behaviors.</p>\n<p>On Windows, <code>file:</code> URLs with a hostname convert to UNC paths, while <code>file:</code>\nURLs with drive letters convert to local absolute paths. <code>file:</code> URLs without a\nhostname nor a drive letter will result in a throw :</p>\n<pre><code class=\"lang-js\">// On Windows :\n\n// - WHATWG file URLs with hostname convert to UNC path\n// file://hostname/p/a/t/h/file =&gt; \\\\hostname\\p\\a\\t\\h\\file\nfs.readFileSync(new URL(&#39;file://hostname/p/a/t/h/file&#39;));\n\n// - WHATWG file URLs with drive letters convert to absolute path\n// file:///C:/tmp/hello =&gt; C:\\tmp\\hello\nfs.readFileSync(new URL(&#39;file:///C:/tmp/hello&#39;));\n\n// - WHATWG file URLs without hostname must have a drive letters\nfs.readFileSync(new URL(&#39;file:///notdriveletter/p/a/t/h/file&#39;));\nfs.readFileSync(new URL(&#39;file:///c/p/a/t/h/file&#39;));\n// TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute\n</code></pre>\n<p><em>Note</em>: <code>file:</code> URLs with drive letters must use <code>:</code> as a separator just after\nthe drive letter. Using another separator will result in a throw.</p>\n<p>On all other platforms, <code>file:</code> URLs with a hostname are unsupported and will\nresult in a throw:</p>\n<pre><code class=\"lang-js\">// On other platforms:\n\n// - WHATWG file URLs with hostname are unsupported\n// file://hostname/p/a/t/h/file =&gt; throw!\nfs.readFileSync(new URL(&#39;file://hostname/p/a/t/h/file&#39;));\n// TypeError [ERR_INVALID_FILE_URL_PATH]: must be absolute\n\n// - WHATWG file URLs convert to absolute path\n// file:///tmp/hello =&gt; /tmp/hello\nfs.readFileSync(new URL(&#39;file:///tmp/hello&#39;));\n</code></pre>\n<p>A <code>file:</code> URL having encoded slash characters will result in a throw on all\nplatforms:</p>\n<pre><code class=\"lang-js\">// On Windows\nfs.readFileSync(new URL(&#39;file:///C:/p/a/t/h/%2F&#39;));\nfs.readFileSync(new URL(&#39;file:///C:/p/a/t/h/%2f&#39;));\n/* TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must not include encoded\n\\ or / characters */\n\n// On POSIX\nfs.readFileSync(new URL(&#39;file:///p/a/t/h/%2F&#39;));\nfs.readFileSync(new URL(&#39;file:///p/a/t/h/%2f&#39;));\n/* TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must not include encoded\n/ characters */\n</code></pre>\n<p>On Windows, <code>file:</code> URLs having encoded backslash will result in a throw:</p>\n<pre><code class=\"lang-js\">// On Windows\nfs.readFileSync(new URL(&#39;file:///C:/path/%5C&#39;));\nfs.readFileSync(new URL(&#39;file:///C:/path/%5c&#39;));\n/* TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must not include encoded\n\\ or / characters */\n</code></pre>\n",
          "type": "module",
          "displayName": "WHATWG URL object support"
        },
        {
          "textRaw": "Buffer API",
          "name": "buffer_api",
          "meta": {
            "added": [
              "v6.0.0"
            ],
            "changes": []
          },
          "desc": "<p><code>fs</code> functions support passing and receiving paths as both strings\nand Buffers. The latter is intended to make it possible to work with\nfilesystems that allow for non-UTF-8 filenames. For most typical\nuses, working with paths as Buffers will be unnecessary, as the string\nAPI converts to and from UTF-8 automatically.</p>\n<p><em>Note</em>: On certain file systems (such as NTFS and HFS+) filenames\nwill always be encoded as UTF-8. On such file systems, passing\nnon-UTF-8 encoded Buffers to <code>fs</code> functions will not work as expected.</p>\n",
          "type": "module",
          "displayName": "Buffer API"
        },
        {
          "textRaw": "FS Constants",
          "name": "fs_constants",
          "desc": "<p>The following constants are exported by <code>fs.constants</code>.</p>\n<p><em>Note</em>: Not every constant will be available on every operating system.</p>\n",
          "modules": [
            {
              "textRaw": "File Access Constants",
              "name": "file_access_constants",
              "desc": "<p>The following constants are meant for use with <a href=\"#fs_fs_access_path_mode_callback\"><code>fs.access()</code></a>.</p>\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>F_OK</code></td>\n    <td>Flag indicating that the file is visible to the calling process.</td>\n  </tr>\n  <tr>\n    <td><code>R_OK</code></td>\n    <td>Flag indicating that the file can be read by the calling process.</td>\n  </tr>\n  <tr>\n    <td><code>W_OK</code></td>\n    <td>Flag indicating that the file can be written by the calling\n    process.</td>\n  </tr>\n  <tr>\n    <td><code>X_OK</code></td>\n    <td>Flag indicating that the file can be executed by the calling\n    process.</td>\n  </tr>\n</table>\n\n",
              "type": "module",
              "displayName": "File Access Constants"
            },
            {
              "textRaw": "File Open Constants",
              "name": "file_open_constants",
              "desc": "<p>The following constants are meant for use with <code>fs.open()</code>.</p>\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>O_RDONLY</code></td>\n    <td>Flag indicating to open a file for read-only access.</td>\n  </tr>\n  <tr>\n    <td><code>O_WRONLY</code></td>\n    <td>Flag indicating to open a file for write-only access.</td>\n  </tr>\n  <tr>\n    <td><code>O_RDWR</code></td>\n    <td>Flag indicating to open a file for read-write access.</td>\n  </tr>\n  <tr>\n    <td><code>O_CREAT</code></td>\n    <td>Flag indicating to create the file if it does not already exist.</td>\n  </tr>\n  <tr>\n    <td><code>O_EXCL</code></td>\n    <td>Flag indicating that opening a file should fail if the\n    <code>O_CREAT</code> flag is set and the file already exists.</td>\n  </tr>\n  <tr>\n    <td><code>O_NOCTTY</code></td>\n    <td>Flag indicating that if path identifies a terminal device, opening the\n    path shall not cause that terminal to become the controlling terminal for\n    the process (if the process does not already have one).</td>\n  </tr>\n  <tr>\n    <td><code>O_TRUNC</code></td>\n    <td>Flag indicating that if the file exists and is a regular file, and the\n    file is opened successfully for write access, its length shall be truncated\n    to zero.</td>\n  </tr>\n  <tr>\n    <td><code>O_APPEND</code></td>\n    <td>Flag indicating that data will be appended to the end of the file.</td>\n  </tr>\n  <tr>\n    <td><code>O_DIRECTORY</code></td>\n    <td>Flag indicating that the open should fail if the path is not a\n    directory.</td>\n  </tr>\n  <tr>\n  <td><code>O_NOATIME</code></td>\n    <td>Flag indicating reading accesses to the file system will no longer\n    result in an update to the <code>atime</code> information associated with the file.\n    This flag is available on Linux operating systems only.</td>\n  </tr>\n  <tr>\n    <td><code>O_NOFOLLOW</code></td>\n    <td>Flag indicating that the open should fail if the path is a symbolic\n    link.</td>\n  </tr>\n  <tr>\n    <td><code>O_SYNC</code></td>\n    <td>Flag indicating that the file is opened for synchronous I/O.</td>\n  </tr>\n  <tr>\n    <td><code>O_SYMLINK</code></td>\n    <td>Flag indicating to open the symbolic link itself rather than the\n    resource it is pointing to.</td>\n  </tr>\n  <tr>\n    <td><code>O_DIRECT</code></td>\n    <td>When set, an attempt will be made to minimize caching effects of file\n    I/O.</td>\n  </tr>\n  <tr>\n    <td><code>O_NONBLOCK</code></td>\n    <td>Flag indicating to open the file in nonblocking mode when possible.</td>\n  </tr>\n</table>\n\n",
              "type": "module",
              "displayName": "File Open Constants"
            },
            {
              "textRaw": "File Type Constants",
              "name": "file_type_constants",
              "desc": "<p>The following constants are meant for use with the <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object&#39;s\n<code>mode</code> property for determining a file&#39;s type.</p>\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>S_IFMT</code></td>\n    <td>Bit mask used to extract the file type code.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFREG</code></td>\n    <td>File type constant for a regular file.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFDIR</code></td>\n    <td>File type constant for a directory.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFCHR</code></td>\n    <td>File type constant for a character-oriented device file.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFBLK</code></td>\n    <td>File type constant for a block-oriented device file.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFIFO</code></td>\n    <td>File type constant for a FIFO/pipe.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFLNK</code></td>\n    <td>File type constant for a symbolic link.</td>\n  </tr>\n  <tr>\n    <td><code>S_IFSOCK</code></td>\n    <td>File type constant for a socket.</td>\n  </tr>\n</table>\n\n",
              "type": "module",
              "displayName": "File Type Constants"
            },
            {
              "textRaw": "File Mode Constants",
              "name": "file_mode_constants",
              "desc": "<p>The following constants are meant for use with the <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object&#39;s\n<code>mode</code> property for determining the access permissions for a file.</p>\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>S_IRWXU</code></td>\n    <td>File mode indicating readable, writable and executable by owner.</td>\n  </tr>\n  <tr>\n    <td><code>S_IRUSR</code></td>\n    <td>File mode indicating readable by owner.</td>\n  </tr>\n  <tr>\n    <td><code>S_IWUSR</code></td>\n    <td>File mode indicating writable by owner.</td>\n  </tr>\n  <tr>\n    <td><code>S_IXUSR</code></td>\n    <td>File mode indicating executable by owner.</td>\n  </tr>\n  <tr>\n    <td><code>S_IRWXG</code></td>\n    <td>File mode indicating readable, writable and executable by group.</td>\n  </tr>\n  <tr>\n    <td><code>S_IRGRP</code></td>\n    <td>File mode indicating readable by group.</td>\n  </tr>\n  <tr>\n    <td><code>S_IWGRP</code></td>\n    <td>File mode indicating writable by group.</td>\n  </tr>\n  <tr>\n    <td><code>S_IXGRP</code></td>\n    <td>File mode indicating executable by group.</td>\n  </tr>\n  <tr>\n    <td><code>S_IRWXO</code></td>\n    <td>File mode indicating readable, writable and executable by others.</td>\n  </tr>\n  <tr>\n    <td><code>S_IROTH</code></td>\n    <td>File mode indicating readable by others.</td>\n  </tr>\n  <tr>\n    <td><code>S_IWOTH</code></td>\n    <td>File mode indicating writable by others.</td>\n  </tr>\n  <tr>\n    <td><code>S_IXOTH</code></td>\n    <td>File mode indicating executable by others.</td>\n  </tr>\n</table>\n\n\n",
              "type": "module",
              "displayName": "File Mode Constants"
            }
          ],
          "type": "module",
          "displayName": "FS Constants"
        }
      ],
      "classes": [
        {
          "textRaw": "Class: fs.FSWatcher",
          "type": "class",
          "name": "fs.FSWatcher",
          "meta": {
            "added": [
              "v0.5.8"
            ],
            "changes": []
          },
          "desc": "<p>Objects returned from <a href=\"#fs_fs_watch_filename_options_listener\"><code>fs.watch()</code></a> are of this type.</p>\n<p>The <code>listener</code> callback provided to <code>fs.watch()</code> receives the returned FSWatcher&#39;s\n<code>change</code> events.</p>\n<p>The object itself emits these events:</p>\n",
          "events": [
            {
              "textRaw": "Event: 'change'",
              "type": "event",
              "name": "change",
              "meta": {
                "added": [
                  "v0.5.8"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when something changes in a watched directory or file.\nSee more details in <a href=\"#fs_fs_watch_filename_options_listener\"><code>fs.watch()</code></a>.</p>\n<p>The <code>filename</code> argument may not be provided depending on operating system\nsupport. If <code>filename</code> is provided, it will be provided as a <code>Buffer</code> if\n<code>fs.watch()</code> is called with its <code>encoding</code> option set to <code>&#39;buffer&#39;</code>, otherwise\n<code>filename</code> will be a string.</p>\n<pre><code class=\"lang-js\">// Example when handled through fs.watch listener\nfs.watch(&#39;./tmp&#39;, { encoding: &#39;buffer&#39; }, (eventType, filename) =&gt; {\n  if (filename)\n    console.log(filename);\n    // Prints: &lt;Buffer ...&gt;\n});\n</code></pre>\n"
            },
            {
              "textRaw": "Event: 'error'",
              "type": "event",
              "name": "error",
              "meta": {
                "added": [
                  "v0.5.8"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when an error occurs.</p>\n"
            }
          ],
          "methods": [
            {
              "textRaw": "watcher.close()",
              "type": "method",
              "name": "close",
              "meta": {
                "added": [
                  "v0.5.8"
                ],
                "changes": []
              },
              "desc": "<p>Stop watching for changes on the given <code>fs.FSWatcher</code>.</p>\n",
              "signatures": [
                {
                  "params": []
                }
              ]
            }
          ]
        },
        {
          "textRaw": "Class: fs.ReadStream",
          "type": "class",
          "name": "fs.ReadStream",
          "meta": {
            "added": [
              "v0.1.93"
            ],
            "changes": []
          },
          "desc": "<p><code>ReadStream</code> is a <a href=\"stream.html#stream_class_stream_readable\">Readable Stream</a>.</p>\n",
          "events": [
            {
              "textRaw": "Event: 'close'",
              "type": "event",
              "name": "close",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "desc": "<p>Emitted when the <code>ReadStream</code>&#39;s underlying file descriptor has been closed\nusing the <code>fs.close()</code> method.</p>\n",
              "params": []
            },
            {
              "textRaw": "Event: 'open'",
              "type": "event",
              "name": "open",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when the ReadStream&#39;s file is opened.</p>\n"
            }
          ],
          "properties": [
            {
              "textRaw": "readStream.bytesRead",
              "name": "bytesRead",
              "meta": {
                "added": [
                  "6.4.0"
                ],
                "changes": []
              },
              "desc": "<p>The number of bytes read so far.</p>\n"
            },
            {
              "textRaw": "readStream.path",
              "name": "path",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "desc": "<p>The path to the file the stream is reading from as specified in the first\nargument to <code>fs.createReadStream()</code>. If <code>path</code> is passed as a string, then\n<code>readStream.path</code> will be a string. If <code>path</code> is passed as a <code>Buffer</code>, then\n<code>readStream.path</code> will be a <code>Buffer</code>.</p>\n"
            }
          ]
        },
        {
          "textRaw": "Class: fs.Stats",
          "type": "class",
          "name": "fs.Stats",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v8.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/13173",
                "description": "Added times as numbers."
              }
            ]
          },
          "desc": "<p>Objects returned from <a href=\"#fs_fs_stat_path_callback\"><code>fs.stat()</code></a>, <a href=\"#fs_fs_lstat_path_callback\"><code>fs.lstat()</code></a> and <a href=\"#fs_fs_fstat_fd_callback\"><code>fs.fstat()</code></a> and\ntheir synchronous counterparts are of this type.</p>\n<ul>\n<li><code>stats.isFile()</code></li>\n<li><code>stats.isDirectory()</code></li>\n<li><code>stats.isBlockDevice()</code></li>\n<li><code>stats.isCharacterDevice()</code></li>\n<li><code>stats.isSymbolicLink()</code> (only valid with <a href=\"#fs_fs_lstat_path_callback\"><code>fs.lstat()</code></a>)</li>\n<li><code>stats.isFIFO()</code></li>\n<li><code>stats.isSocket()</code></li>\n</ul>\n<p>For a regular file <a href=\"util.html#util_util_inspect_object_options\"><code>util.inspect(stats)</code></a> would return a string very\nsimilar to this:</p>\n<pre><code class=\"lang-console\">Stats {\n  dev: 2114,\n  ino: 48064969,\n  mode: 33188,\n  nlink: 1,\n  uid: 85,\n  gid: 100,\n  rdev: 0,\n  size: 527,\n  blksize: 4096,\n  blocks: 8,\n  atimeMs: 1318289051000.1,\n  mtimeMs: 1318289051000.1,\n  ctimeMs: 1318289051000.1,\n  birthtimeMs: 1318289051000.1,\n  atime: Mon, 10 Oct 2011 23:24:11 GMT,\n  mtime: Mon, 10 Oct 2011 23:24:11 GMT,\n  ctime: Mon, 10 Oct 2011 23:24:11 GMT,\n  birthtime: Mon, 10 Oct 2011 23:24:11 GMT }\n</code></pre>\n<p><em>Note</em>: <code>atimeMs</code>, <code>mtimeMs</code>, <code>ctimeMs</code>, <code>birthtimeMs</code> are <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\">numbers</a>\nthat hold the corresponding times in milliseconds. Their precision is platform\nspecific. <code>atime</code>, <code>mtime</code>, <code>ctime</code>, and <code>birthtime</code> are <a href=\"https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date\"><code>Date</code></a>\nobject alternate representations of the various times. The <code>Date</code> and number\nvalues are not connected. Assigning a new number value, or mutating the <code>Date</code>\nvalue, will not be reflected in the corresponding alternate representation.</p>\n",
          "modules": [
            {
              "textRaw": "Stat Time Values",
              "name": "stat_time_values",
              "desc": "<p>The times in the stat object have the following semantics:</p>\n<ul>\n<li><code>atime</code> &quot;Access Time&quot; - Time when file data last accessed.  Changed\nby the mknod(2), utimes(2), and read(2) system calls.</li>\n<li><code>mtime</code> &quot;Modified Time&quot; - Time when file data last modified.\nChanged by the mknod(2), utimes(2), and write(2) system calls.</li>\n<li><code>ctime</code> &quot;Change Time&quot; - Time when file status was last changed\n(inode data modification).  Changed by the chmod(2), chown(2),\nlink(2), mknod(2), rename(2), unlink(2), utimes(2),\nread(2), and write(2) system calls.</li>\n<li><code>birthtime</code> &quot;Birth Time&quot; -  Time of file creation. Set once when the\nfile is created.  On filesystems where birthtime is not available,\nthis field may instead hold either the <code>ctime</code> or\n<code>1970-01-01T00:00Z</code> (ie, unix epoch timestamp <code>0</code>). Note that this\nvalue may be greater than <code>atime</code> or <code>mtime</code> in this case. On Darwin\nand other FreeBSD variants, also set if the <code>atime</code> is explicitly\nset to an earlier value than the current <code>birthtime</code> using the\nutimes(2) system call.</li>\n</ul>\n<p>Prior to Node v0.12, the <code>ctime</code> held the <code>birthtime</code> on Windows\nsystems.  Note that as of v0.12, <code>ctime</code> is not &quot;creation time&quot;, and\non Unix systems, it never was.</p>\n",
              "type": "module",
              "displayName": "Stat Time Values"
            }
          ]
        },
        {
          "textRaw": "Class: fs.WriteStream",
          "type": "class",
          "name": "fs.WriteStream",
          "meta": {
            "added": [
              "v0.1.93"
            ],
            "changes": []
          },
          "desc": "<p><code>WriteStream</code> is a <a href=\"stream.html#stream_class_stream_writable\">Writable Stream</a>.</p>\n",
          "events": [
            {
              "textRaw": "Event: 'close'",
              "type": "event",
              "name": "close",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "desc": "<p>Emitted when the <code>WriteStream</code>&#39;s underlying file descriptor has been closed\nusing the <code>fs.close()</code> method.</p>\n",
              "params": []
            },
            {
              "textRaw": "Event: 'open'",
              "type": "event",
              "name": "open",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when the WriteStream&#39;s file is opened.</p>\n"
            }
          ],
          "properties": [
            {
              "textRaw": "writeStream.bytesWritten",
              "name": "bytesWritten",
              "meta": {
                "added": [
                  "v0.4.7"
                ],
                "changes": []
              },
              "desc": "<p>The number of bytes written so far. Does not include data that is still queued\nfor writing.</p>\n"
            },
            {
              "textRaw": "writeStream.path",
              "name": "path",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "desc": "<p>The path to the file the stream is writing to as specified in the first\nargument to <code>fs.createWriteStream()</code>. If <code>path</code> is passed as a string, then\n<code>writeStream.path</code> will be a string. If <code>path</code> is passed as a <code>Buffer</code>, then\n<code>writeStream.path</code> will be a <code>Buffer</code>.</p>\n"
            }
          ]
        }
      ],
      "methods": [
        {
          "textRaw": "fs.access(path[, mode], callback)",
          "type": "method",
          "name": "access",
          "meta": {
            "added": [
              "v0.11.15"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v6.3.0",
                "pr-url": "https://github.com/nodejs/node/pull/6534",
                "description": "The constants like `fs.R_OK`, etc which were present directly on `fs` were moved into `fs.constants` as a soft deprecation. Thus for Node `< v6.3.0` use `fs` to access those constants, or do something like `(fs.constants || fs).R_OK` to work with all versions."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Tests a user&#39;s permissions for the file or directory specified by <code>path</code>.\nThe <code>mode</code> argument is an optional integer that specifies the accessibility\nchecks to be performed. The following constants define the possible values of\n<code>mode</code>. It is possible to create a mask consisting of the bitwise OR of two or\nmore values.</p>\n<ul>\n<li><code>fs.constants.F_OK</code> - <code>path</code> is visible to the calling process. This is useful\nfor determining if a file exists, but says nothing about <code>rwx</code> permissions.\nDefault if no <code>mode</code> is specified.</li>\n<li><code>fs.constants.R_OK</code> - <code>path</code> can be read by the calling process.</li>\n<li><code>fs.constants.W_OK</code> - <code>path</code> can be written by the calling process.</li>\n<li><code>fs.constants.X_OK</code> - <code>path</code> can be executed by the calling process. This has\nno effect on Windows (will behave like <code>fs.constants.F_OK</code>).</li>\n</ul>\n<p>The final argument, <code>callback</code>, is a callback function that is invoked with\na possible error argument. If any of the accessibility checks fail, the error\nargument will be populated. The following example checks if the file\n<code>/etc/passwd</code> can be read and written by the current process.</p>\n<pre><code class=\"lang-js\">fs.access(&#39;/etc/passwd&#39;, fs.constants.R_OK | fs.constants.W_OK, (err) =&gt; {\n  console.log(err ? &#39;no access!&#39; : &#39;can read/write&#39;);\n});\n</code></pre>\n<p>Using <code>fs.access()</code> to check for the accessibility of a file before calling\n<code>fs.open()</code>, <code>fs.readFile()</code> or <code>fs.writeFile()</code> is not recommended. Doing\nso introduces a race condition, since other processes may change the file&#39;s\nstate between the two calls. Instead, user code should open/read/write the\nfile directly and handle the error raised if the file is not accessible.</p>\n<p>For example:</p>\n<p><strong>write (NOT RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.access(&#39;myfile&#39;, (err) =&gt; {\n  if (!err) {\n    console.error(&#39;myfile already exists&#39;);\n    return;\n  }\n\n  fs.open(&#39;myfile&#39;, &#39;wx&#39;, (err, fd) =&gt; {\n    if (err) throw err;\n    writeMyData(fd);\n  });\n});\n</code></pre>\n<p><strong>write (RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.open(&#39;myfile&#39;, &#39;wx&#39;, (err, fd) =&gt; {\n  if (err) {\n    if (err.code === &#39;EEXIST&#39;) {\n      console.error(&#39;myfile already exists&#39;);\n      return;\n    }\n\n    throw err;\n  }\n\n  writeMyData(fd);\n});\n</code></pre>\n<p><strong>read (NOT RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.access(&#39;myfile&#39;, (err) =&gt; {\n  if (err) {\n    if (err.code === &#39;ENOENT&#39;) {\n      console.error(&#39;myfile does not exist&#39;);\n      return;\n    }\n\n    throw err;\n  }\n\n  fs.open(&#39;myfile&#39;, &#39;r&#39;, (err, fd) =&gt; {\n    if (err) throw err;\n    readMyData(fd);\n  });\n});\n</code></pre>\n<p><strong>read (RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.open(&#39;myfile&#39;, &#39;r&#39;, (err, fd) =&gt; {\n  if (err) {\n    if (err.code === &#39;ENOENT&#39;) {\n      console.error(&#39;myfile does not exist&#39;);\n      return;\n    }\n\n    throw err;\n  }\n\n  readMyData(fd);\n});\n</code></pre>\n<p>The &quot;not recommended&quot; examples above check for accessibility and then use the\nfile; the &quot;recommended&quot; examples are better because they use the file directly\nand handle the error, if any.</p>\n<p>In general, check for the accessibility of a file only if the file won’t be\nused directly, for example when its accessibility is a signal from another\nprocess.</p>\n"
        },
        {
          "textRaw": "fs.accessSync(path[, mode])",
          "type": "method",
          "name": "accessSync",
          "meta": {
            "added": [
              "v0.11.15"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"#fs_fs_access_path_mode_callback\"><code>fs.access()</code></a>. This throws if any accessibility\nchecks fail, and does nothing otherwise.</p>\n"
        },
        {
          "textRaw": "fs.appendFile(file, data[, options], callback)",
          "type": "method",
          "name": "appendFile",
          "meta": {
            "added": [
              "v0.6.7"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7831",
                "description": "The passed `options` object will never be modified."
              },
              {
                "version": "v5.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3163",
                "description": "The `file` parameter can be a file descriptor now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`file` {string|Buffer|number} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|number",
                  "desc": "filename or file descriptor"
                },
                {
                  "textRaw": "`data` {string|Buffer} ",
                  "name": "data",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`options` {Object|string} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string|null} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string|null",
                      "desc": "default = `'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} default = `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "desc": "default = `0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} default = `'a'` ",
                      "name": "flag",
                      "type": "string",
                      "desc": "default = `'a'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "file"
                },
                {
                  "name": "data"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously append data to a file, creating the file if it does not yet exist.\n<code>data</code> can be a string or a buffer.</p>\n<p>Example:</p>\n<pre><code class=\"lang-js\">fs.appendFile(&#39;message.txt&#39;, &#39;data to append&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;The &quot;data to append&quot; was appended to file!&#39;);\n});\n</code></pre>\n<p>If <code>options</code> is a string, then it specifies the encoding. Example:</p>\n<pre><code class=\"lang-js\">fs.appendFile(&#39;message.txt&#39;, &#39;data to append&#39;, &#39;utf8&#39;, callback);\n</code></pre>\n<p>Any specified file descriptor has to have been opened for appending.</p>\n<p><em>Note</em>: If a file descriptor is specified as the <code>file</code>, it will not be closed\nautomatically.</p>\n"
        },
        {
          "textRaw": "fs.appendFileSync(file, data[, options])",
          "type": "method",
          "name": "appendFileSync",
          "meta": {
            "added": [
              "v0.6.7"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7831",
                "description": "The passed `options` object will never be modified."
              },
              {
                "version": "v5.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3163",
                "description": "The `file` parameter can be a file descriptor now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`file` {string|Buffer|number} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|number",
                  "desc": "filename or file descriptor"
                },
                {
                  "textRaw": "`data` {string|Buffer} ",
                  "name": "data",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`options` {Object|string} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string|null} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string|null",
                      "desc": "default = `'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} default = `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "desc": "default = `0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} default = `'a'` ",
                      "name": "flag",
                      "type": "string",
                      "desc": "default = `'a'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "file"
                },
                {
                  "name": "data"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The synchronous version of <a href=\"fs.html#fs_fs_appendfile_file_data_options_callback\"><code>fs.appendFile()</code></a>. Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.chmod(path, mode, callback)",
          "type": "method",
          "name": "chmod",
          "meta": {
            "added": [
              "v0.1.30"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous chmod(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.chmodSync(path, mode)",
          "type": "method",
          "name": "chmodSync",
          "meta": {
            "added": [
              "v0.6.7"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous chmod(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.chown(path, uid, gid, callback)",
          "type": "method",
          "name": "chown",
          "meta": {
            "added": [
              "v0.1.97"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`uid` {integer} ",
                  "name": "uid",
                  "type": "integer"
                },
                {
                  "textRaw": "`gid` {integer} ",
                  "name": "gid",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous chown(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.chownSync(path, uid, gid)",
          "type": "method",
          "name": "chownSync",
          "meta": {
            "added": [
              "v0.1.97"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`uid` {integer} ",
                  "name": "uid",
                  "type": "integer"
                },
                {
                  "textRaw": "`gid` {integer} ",
                  "name": "gid",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous chown(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.close(fd, callback)",
          "type": "method",
          "name": "close",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous close(2).  No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.closeSync(fd)",
          "type": "method",
          "name": "closeSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous close(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.createReadStream(path[, options])",
          "type": "method",
          "name": "createReadStream",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7831",
                "description": "The passed `options` object will never be modified."
              },
              {
                "version": "v2.3.0",
                "pr-url": "https://github.com/nodejs/node/pull/1845",
                "description": "The passed `options` object can be a string now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`flags` {string} ",
                      "name": "flags",
                      "type": "string"
                    },
                    {
                      "textRaw": "`encoding` {string} ",
                      "name": "encoding",
                      "type": "string"
                    },
                    {
                      "textRaw": "`fd` {integer} ",
                      "name": "fd",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`mode` {integer} ",
                      "name": "mode",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`autoClose` {boolean} ",
                      "name": "autoClose",
                      "type": "boolean"
                    },
                    {
                      "textRaw": "`start` {integer} ",
                      "name": "start",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`end` {integer} ",
                      "name": "end",
                      "type": "integer"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Returns a new <a href=\"#fs_class_fs_readstream\"><code>ReadStream</code></a> object. (See <a href=\"stream.html#stream_class_stream_readable\">Readable Stream</a>).</p>\n<p>Be aware that, unlike the default value set for <code>highWaterMark</code> on a\nreadable stream (16 kb), the stream returned by this method has a\ndefault value of 64 kb for the same parameter.</p>\n<p><code>options</code> is an object or string with the following defaults:</p>\n<pre><code class=\"lang-js\">const defaults = {\n  flags: &#39;r&#39;,\n  encoding: null,\n  fd: null,\n  mode: 0o666,\n  autoClose: true\n};\n</code></pre>\n<p><code>options</code> can include <code>start</code> and <code>end</code> values to read a range of bytes from\nthe file instead of the entire file.  Both <code>start</code> and <code>end</code> are inclusive and\nstart counting at 0. If <code>fd</code> is specified and <code>start</code> is omitted or <code>undefined</code>,\n<code>fs.createReadStream()</code> reads sequentially from the current file position.\nThe <code>encoding</code> can be any one of those accepted by <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>.</p>\n<p>If <code>fd</code> is specified, <code>ReadStream</code> will ignore the <code>path</code> argument and will use\nthe specified file descriptor. This means that no <code>&#39;open&#39;</code> event will be\nemitted. Note that <code>fd</code> should be blocking; non-blocking <code>fd</code>s should be passed\nto <a href=\"net.html#net_class_net_socket\"><code>net.Socket</code></a>.</p>\n<p>If <code>autoClose</code> is false, then the file descriptor won&#39;t be closed, even if\nthere&#39;s an error. It is the application&#39;s responsibility to close it and make\nsure there&#39;s no file descriptor leak. If <code>autoClose</code> is set to true (default\nbehavior), on <code>error</code> or <code>end</code> the file descriptor will be closed\nautomatically.</p>\n<p><code>mode</code> sets the file mode (permission and sticky bits), but only if the\nfile was created.</p>\n<p>An example to read the last 10 bytes of a file which is 100 bytes long:</p>\n<pre><code class=\"lang-js\">fs.createReadStream(&#39;sample.txt&#39;, { start: 90, end: 99 });\n</code></pre>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n"
        },
        {
          "textRaw": "fs.createWriteStream(path[, options])",
          "type": "method",
          "name": "createWriteStream",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7831",
                "description": "The passed `options` object will never be modified."
              },
              {
                "version": "v5.5.0",
                "pr-url": "https://github.com/nodejs/node/pull/3679",
                "description": "The `autoClose` option is supported now."
              },
              {
                "version": "v2.3.0",
                "pr-url": "https://github.com/nodejs/node/pull/1845",
                "description": "The passed `options` object can be a string now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`flags` {string} ",
                      "name": "flags",
                      "type": "string"
                    },
                    {
                      "textRaw": "`defaultEncoding` {string} ",
                      "name": "defaultEncoding",
                      "type": "string"
                    },
                    {
                      "textRaw": "`fd` {integer} ",
                      "name": "fd",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`mode` {integer} ",
                      "name": "mode",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`autoClose` {boolean} ",
                      "name": "autoClose",
                      "type": "boolean"
                    },
                    {
                      "textRaw": "`start` {integer} ",
                      "name": "start",
                      "type": "integer"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Returns a new <a href=\"#fs_class_fs_writestream\"><code>WriteStream</code></a> object. (See <a href=\"stream.html#stream_class_stream_writable\">Writable Stream</a>).</p>\n<p><code>options</code> is an object or string with the following defaults:</p>\n<pre><code class=\"lang-js\">const defaults = {\n  flags: &#39;w&#39;,\n  defaultEncoding: &#39;utf8&#39;,\n  fd: null,\n  mode: 0o666,\n  autoClose: true\n};\n</code></pre>\n<p><code>options</code> may also include a <code>start</code> option to allow writing data at\nsome position past the beginning of the file.  Modifying a file rather\nthan replacing it may require a <code>flags</code> mode of <code>r+</code> rather than the\ndefault mode <code>w</code>. The <code>defaultEncoding</code> can be any one of those accepted by\n<a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>.</p>\n<p>If <code>autoClose</code> is set to true (default behavior) on <code>error</code> or <code>end</code>\nthe file descriptor will be closed automatically. If <code>autoClose</code> is false,\nthen the file descriptor won&#39;t be closed, even if there&#39;s an error.\nIt is the application&#39;s responsibility to close it and make sure there&#39;s no\nfile descriptor leak.</p>\n<p>Like <a href=\"#fs_class_fs_readstream\"><code>ReadStream</code></a>, if <code>fd</code> is specified, <code>WriteStream</code> will ignore the\n<code>path</code> argument and will use the specified file descriptor. This means that no\n<code>&#39;open&#39;</code> event will be emitted. Note that <code>fd</code> should be blocking; non-blocking\n<code>fd</code>s should be passed to <a href=\"net.html#net_class_net_socket\"><code>net.Socket</code></a>.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n"
        },
        {
          "textRaw": "fs.exists(path, callback)",
          "type": "method",
          "name": "exists",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ],
            "deprecated": [
              "v1.0.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated: Use [`fs.stat()`][] or [`fs.access()`][] instead.",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Test whether or not the given path exists by checking with the file system.\nThen call the <code>callback</code> argument with either true or false.  Example:</p>\n<pre><code class=\"lang-js\">fs.exists(&#39;/etc/passwd&#39;, (exists) =&gt; {\n  console.log(exists ? &#39;it\\&#39;s there&#39; : &#39;no passwd!&#39;);\n});\n</code></pre>\n<p><strong>Note that the parameter to this callback is not consistent with other\nNode.js callbacks.</strong> Normally, the first parameter to a Node.js callback is\nan <code>err</code> parameter, optionally followed by other parameters. The\n<code>fs.exists()</code> callback has only one boolean parameter. This is one reason\n<code>fs.access()</code> is recommended instead of <code>fs.exists()</code>.</p>\n<p>Using <code>fs.exists()</code> to check for the existence of a file before calling\n<code>fs.open()</code>, <code>fs.readFile()</code> or <code>fs.writeFile()</code> is not recommended. Doing\nso introduces a race condition, since other processes may change the file&#39;s\nstate between the two calls. Instead, user code should open/read/write the\nfile directly and handle the error raised if the file does not exist.</p>\n<p>For example:</p>\n<p><strong>write (NOT RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.exists(&#39;myfile&#39;, (exists) =&gt; {\n  if (exists) {\n    console.error(&#39;myfile already exists&#39;);\n  } else {\n    fs.open(&#39;myfile&#39;, &#39;wx&#39;, (err, fd) =&gt; {\n      if (err) throw err;\n      writeMyData(fd);\n    });\n  }\n});\n</code></pre>\n<p><strong>write (RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.open(&#39;myfile&#39;, &#39;wx&#39;, (err, fd) =&gt; {\n  if (err) {\n    if (err.code === &#39;EEXIST&#39;) {\n      console.error(&#39;myfile already exists&#39;);\n      return;\n    }\n\n    throw err;\n  }\n\n  writeMyData(fd);\n});\n</code></pre>\n<p><strong>read (NOT RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.exists(&#39;myfile&#39;, (exists) =&gt; {\n  if (exists) {\n    fs.open(&#39;myfile&#39;, &#39;r&#39;, (err, fd) =&gt; {\n      readMyData(fd);\n    });\n  } else {\n    console.error(&#39;myfile does not exist&#39;);\n  }\n});\n</code></pre>\n<p><strong>read (RECOMMENDED)</strong></p>\n<pre><code class=\"lang-js\">fs.open(&#39;myfile&#39;, &#39;r&#39;, (err, fd) =&gt; {\n  if (err) {\n    if (err.code === &#39;ENOENT&#39;) {\n      console.error(&#39;myfile does not exist&#39;);\n      return;\n    }\n\n    throw err;\n  }\n\n  readMyData(fd);\n});\n</code></pre>\n<p>The &quot;not recommended&quot; examples above check for existence and then use the\nfile; the &quot;recommended&quot; examples are better because they use the file directly\nand handle the error, if any.</p>\n<p>In general, check for the existence of a file only if the file won’t be\nused directly, for example when its existence is a signal from another\nprocess.</p>\n"
        },
        {
          "textRaw": "fs.existsSync(path)",
          "type": "method",
          "name": "existsSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"fs.html#fs_fs_exists_path_callback\"><code>fs.exists()</code></a>.\nReturns <code>true</code> if the file exists, <code>false</code> otherwise.</p>\n<p>Note that <code>fs.exists()</code> is deprecated, but <code>fs.existsSync()</code> is not.\n(The <code>callback</code> parameter to <code>fs.exists()</code> accepts parameters that are\ninconsistent with other Node.js callbacks. <code>fs.existsSync()</code> does not use\na callback.)</p>\n"
        },
        {
          "textRaw": "fs.fchmod(fd, mode, callback)",
          "type": "method",
          "name": "fchmod",
          "meta": {
            "added": [
              "v0.4.7"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "mode"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous fchmod(2). No arguments other than a possible exception\nare given to the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.fchmodSync(fd, mode)",
          "type": "method",
          "name": "fchmodSync",
          "meta": {
            "added": [
              "v0.4.7"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "mode"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous fchmod(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.fchown(fd, uid, gid, callback)",
          "type": "method",
          "name": "fchown",
          "meta": {
            "added": [
              "v0.4.7"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`uid` {integer} ",
                  "name": "uid",
                  "type": "integer"
                },
                {
                  "textRaw": "`gid` {integer} ",
                  "name": "gid",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous fchown(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.fchownSync(fd, uid, gid)",
          "type": "method",
          "name": "fchownSync",
          "meta": {
            "added": [
              "v0.4.7"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`uid` {integer} ",
                  "name": "uid",
                  "type": "integer"
                },
                {
                  "textRaw": "`gid` {integer} ",
                  "name": "gid",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous fchown(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.fdatasync(fd, callback)",
          "type": "method",
          "name": "fdatasync",
          "meta": {
            "added": [
              "v0.1.96"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous fdatasync(2). No arguments other than a possible exception are\ngiven to the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.fdatasyncSync(fd)",
          "type": "method",
          "name": "fdatasyncSync",
          "meta": {
            "added": [
              "v0.1.96"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous fdatasync(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.fstat(fd, callback)",
          "type": "method",
          "name": "fstat",
          "meta": {
            "added": [
              "v0.1.95"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous fstat(2). The callback gets two arguments <code>(err, stats)</code> where\n<code>stats</code> is an <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object. <code>fstat()</code> is identical to <a href=\"fs.html#fs_fs_stat_path_callback\"><code>stat()</code></a>,\nexcept that the file to be stat-ed is specified by the file descriptor <code>fd</code>.</p>\n"
        },
        {
          "textRaw": "fs.fstatSync(fd)",
          "type": "method",
          "name": "fstatSync",
          "meta": {
            "added": [
              "v0.1.95"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous fstat(2). Returns an instance of <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a>.</p>\n"
        },
        {
          "textRaw": "fs.fsync(fd, callback)",
          "type": "method",
          "name": "fsync",
          "meta": {
            "added": [
              "v0.1.96"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous fsync(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.fsyncSync(fd)",
          "type": "method",
          "name": "fsyncSync",
          "meta": {
            "added": [
              "v0.1.96"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous fsync(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.ftruncate(fd, len, callback)",
          "type": "method",
          "name": "ftruncate",
          "meta": {
            "added": [
              "v0.8.6"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`len` {integer} default = `0` ",
                  "name": "len",
                  "type": "integer",
                  "desc": "default = `0`"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "len"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous ftruncate(2). No arguments other than a possible exception are\ngiven to the completion callback.</p>\n<p>If the file referred to by the file descriptor was larger than <code>len</code> bytes, only\nthe first <code>len</code> bytes will be retained in the file.</p>\n<p>For example, the following program retains only the first four bytes of the file</p>\n<pre><code class=\"lang-js\">console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));\n// Prints: Node.js\n\n// get the file descriptor of the file to be truncated\nconst fd = fs.openSync(&#39;temp.txt&#39;, &#39;r+&#39;);\n\n// truncate the file to first four bytes\nfs.ftruncate(fd, 4, (err) =&gt; {\n  assert.ifError(err);\n  console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));\n});\n// Prints: Node\n</code></pre>\n<p>If the file previously was shorter than <code>len</code> bytes, it is extended, and the\nextended part is filled with null bytes (&#39;\\0&#39;). For example,</p>\n<pre><code class=\"lang-js\">console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf-8&#39;));\n// Prints: Node.js\n\n// get the file descriptor of the file to be truncated\nconst fd = fs.openSync(&#39;temp.txt&#39;, &#39;r+&#39;);\n\n// truncate the file to 10 bytes, whereas the actual size is 7 bytes\nfs.ftruncate(fd, 10, (err) =&gt; {\n  assert.ifError(err);\n  console.log(fs.readFileSync(&#39;temp.txt&#39;));\n});\n// Prints: &lt;Buffer 4e 6f 64 65 2e 6a 73 00 00 00&gt;\n// (&#39;Node.js\\0\\0\\0&#39; in UTF8)\n</code></pre>\n<p>The last three bytes are null bytes (&#39;\\0&#39;), to compensate the over-truncation.</p>\n"
        },
        {
          "textRaw": "fs.ftruncateSync(fd, len)",
          "type": "method",
          "name": "ftruncateSync",
          "meta": {
            "added": [
              "v0.8.6"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`len` {integer} default = `0` ",
                  "name": "len",
                  "type": "integer",
                  "desc": "default = `0`"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "len"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous ftruncate(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.futimes(fd, atime, mtime, callback)",
          "type": "method",
          "name": "futimes",
          "meta": {
            "added": [
              "v0.4.2"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v4.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/2387",
                "description": "Numeric strings, `NaN` and `Infinity` are now allowed time specifiers."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`atime` {integer} ",
                  "name": "atime",
                  "type": "integer"
                },
                {
                  "textRaw": "`mtime` {integer} ",
                  "name": "mtime",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "atime"
                },
                {
                  "name": "mtime"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Change the file timestamps of a file referenced by the supplied file\ndescriptor.</p>\n"
        },
        {
          "textRaw": "fs.futimesSync(fd, atime, mtime)",
          "type": "method",
          "name": "futimesSync",
          "meta": {
            "added": [
              "v0.4.2"
            ],
            "changes": [
              {
                "version": "v4.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/2387",
                "description": "Numeric strings, `NaN` and `Infinity` are now allowed time specifiers."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`atime` {integer} ",
                  "name": "atime",
                  "type": "integer"
                },
                {
                  "textRaw": "`mtime` {integer} ",
                  "name": "mtime",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "atime"
                },
                {
                  "name": "mtime"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"#fs_fs_futimes_fd_atime_mtime_callback\"><code>fs.futimes()</code></a>. Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.lchmod(path, mode, callback)",
          "type": "method",
          "name": "lchmod",
          "meta": {
            "deprecated": [
              "v0.4.7"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer} ",
                  "name": "path",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous lchmod(2). No arguments other than a possible exception\nare given to the completion callback.</p>\n<p>Only available on macOS.</p>\n"
        },
        {
          "textRaw": "fs.lchmodSync(path, mode)",
          "type": "method",
          "name": "lchmodSync",
          "meta": {
            "deprecated": [
              "v0.4.7"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer} ",
                  "name": "path",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous lchmod(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.lchown(path, uid, gid, callback)",
          "type": "method",
          "name": "lchown",
          "meta": {
            "deprecated": [
              "v0.4.7"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer} ",
                  "name": "path",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`uid` {integer} ",
                  "name": "uid",
                  "type": "integer"
                },
                {
                  "textRaw": "`gid` {integer} ",
                  "name": "gid",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous lchown(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.lchownSync(path, uid, gid)",
          "type": "method",
          "name": "lchownSync",
          "meta": {
            "deprecated": [
              "v0.4.7"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer} ",
                  "name": "path",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`uid` {integer} ",
                  "name": "uid",
                  "type": "integer"
                },
                {
                  "textRaw": "`gid` {integer} ",
                  "name": "gid",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous lchown(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.link(existingPath, newPath, callback)",
          "type": "method",
          "name": "link",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `existingPath` and `newPath` parameters can be WHATWG `URL` objects using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`existingPath` {string|Buffer|URL} ",
                  "name": "existingPath",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`newPath` {string|Buffer|URL} ",
                  "name": "newPath",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "existingPath"
                },
                {
                  "name": "newPath"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous link(2). No arguments other than a possible exception are given to\nthe completion callback.</p>\n"
        },
        {
          "textRaw": "fs.linkSync(existingPath, newPath)",
          "type": "method",
          "name": "linkSync",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `existingPath` and `newPath` parameters can be WHATWG `URL` objects using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`existingPath` {string|Buffer|URL} ",
                  "name": "existingPath",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`newPath` {string|Buffer|URL} ",
                  "name": "newPath",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "existingPath"
                },
                {
                  "name": "newPath"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous link(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.lstat(path, callback)",
          "type": "method",
          "name": "lstat",
          "meta": {
            "added": [
              "v0.1.30"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous lstat(2). The callback gets two arguments <code>(err, stats)</code> where\n<code>stats</code> is a <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object. <code>lstat()</code> is identical to <code>stat()</code>,\nexcept that if <code>path</code> is a symbolic link, then the link itself is stat-ed,\nnot the file that it refers to.</p>\n"
        },
        {
          "textRaw": "fs.lstatSync(path)",
          "type": "method",
          "name": "lstatSync",
          "meta": {
            "added": [
              "v0.1.30"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous lstat(2). Returns an instance of <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a>.</p>\n"
        },
        {
          "textRaw": "fs.mkdir(path[, mode], callback)",
          "type": "method",
          "name": "mkdir",
          "meta": {
            "added": [
              "v0.1.8"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous mkdir(2). No arguments other than a possible exception are given\nto the completion callback. <code>mode</code> defaults to <code>0o777</code>.</p>\n"
        },
        {
          "textRaw": "fs.mkdirSync(path[, mode])",
          "type": "method",
          "name": "mkdirSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous mkdir(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.mkdtemp(prefix[, options], callback)",
          "type": "method",
          "name": "mkdtemp",
          "meta": {
            "added": [
              "v5.10.0"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v6.2.1",
                "pr-url": "https://github.com/nodejs/node/pull/6828",
                "description": "The `callback` parameter is optional now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`prefix` {string} ",
                  "name": "prefix",
                  "type": "string"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "prefix"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Creates a unique temporary directory.</p>\n<p>Generates six random characters to be appended behind a required\n<code>prefix</code> to create a unique temporary directory.</p>\n<p>The created folder path is passed as a string to the callback&#39;s second\nparameter.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use.</p>\n<p>Example:</p>\n<pre><code class=\"lang-js\">fs.mkdtemp(&#39;/tmp/foo-&#39;, (err, folder) =&gt; {\n  if (err) throw err;\n  console.log(folder);\n  // Prints: /tmp/foo-itXde2\n});\n</code></pre>\n<p><em>Note</em>: The <code>fs.mkdtemp()</code> method will append the six randomly selected\ncharacters directly to the <code>prefix</code> string. For instance, given a directory\n<code>/tmp</code>, if the intention is to create a temporary directory <em>within</em> <code>/tmp</code>,\nthe <code>prefix</code> <em>must</em> end with a trailing platform-specific path separator\n(<code>require(&#39;path&#39;).sep</code>).</p>\n<pre><code class=\"lang-js\">// The parent directory for the new temporary directory\nconst tmpDir = &#39;/tmp&#39;;\n\n// This method is *INCORRECT*:\nfs.mkdtemp(tmpDir, (err, folder) =&gt; {\n  if (err) throw err;\n  console.log(folder);\n  // Will print something similar to `/tmpabc123`.\n  // Note that a new temporary directory is created\n  // at the file system root rather than *within*\n  // the /tmp directory.\n});\n\n// This method is *CORRECT*:\nconst { sep } = require(&#39;path&#39;);\nfs.mkdtemp(`${tmpDir}${sep}`, (err, folder) =&gt; {\n  if (err) throw err;\n  console.log(folder);\n  // Will print something similar to `/tmp/abc123`.\n  // A new temporary directory is created within\n  // the /tmp directory.\n});\n</code></pre>\n"
        },
        {
          "textRaw": "fs.mkdtempSync(prefix[, options])",
          "type": "method",
          "name": "mkdtempSync",
          "meta": {
            "added": [
              "v5.10.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`prefix` {string} ",
                  "name": "prefix",
                  "type": "string"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "prefix"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The synchronous version of <a href=\"#fs_fs_mkdtemp_prefix_options_callback\"><code>fs.mkdtemp()</code></a>. Returns the created\nfolder path.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use.</p>\n"
        },
        {
          "textRaw": "fs.open(path, flags[, mode], callback)",
          "type": "method",
          "name": "open",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`flags` {string|number} ",
                  "name": "flags",
                  "type": "string|number"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "flags"
                },
                {
                  "name": "mode",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous file open. See open(2). <code>flags</code> can be:</p>\n<ul>\n<li><p><code>&#39;r&#39;</code> - Open file for reading.\nAn exception occurs if the file does not exist.</p>\n</li>\n<li><p><code>&#39;r+&#39;</code> - Open file for reading and writing.\nAn exception occurs if the file does not exist.</p>\n</li>\n<li><p><code>&#39;rs+&#39;</code> - Open file for reading and writing in synchronous mode. Instructs\nthe operating system to bypass the local file system cache.</p>\n<p>This is primarily useful for opening files on NFS mounts as it allows skipping\nthe potentially stale local cache. It has a very real impact on I/O\nperformance so using this flag is not recommended unless it is needed.</p>\n<p>Note that this doesn&#39;t turn <code>fs.open()</code> into a synchronous blocking call.\nIf synchronous operation is desired <code>fs.openSync()</code> should be used.</p>\n</li>\n<li><p><code>&#39;w&#39;</code> - Open file for writing.\nThe file is created (if it does not exist) or truncated (if it exists).</p>\n</li>\n<li><p><code>&#39;wx&#39;</code> - Like <code>&#39;w&#39;</code> but fails if <code>path</code> exists.</p>\n</li>\n<li><p><code>&#39;w+&#39;</code> - Open file for reading and writing.\nThe file is created (if it does not exist) or truncated (if it exists).</p>\n</li>\n<li><p><code>&#39;wx+&#39;</code> - Like <code>&#39;w+&#39;</code> but fails if <code>path</code> exists.</p>\n</li>\n<li><p><code>&#39;a&#39;</code> - Open file for appending.\nThe file is created if it does not exist.</p>\n</li>\n<li><p><code>&#39;ax&#39;</code> - Like <code>&#39;a&#39;</code> but fails if <code>path</code> exists.</p>\n</li>\n<li><p><code>&#39;a+&#39;</code> - Open file for reading and appending.\nThe file is created if it does not exist.</p>\n</li>\n<li><p><code>&#39;ax+&#39;</code> - Like <code>&#39;a+&#39;</code> but fails if <code>path</code> exists.</p>\n</li>\n</ul>\n<p><code>mode</code> sets the file mode (permission and sticky bits), but only if the file was\ncreated. It defaults to <code>0666</code>, readable and writable.</p>\n<p>The callback gets two arguments <code>(err, fd)</code>.</p>\n<p>The exclusive flag <code>&#39;x&#39;</code> (<code>O_EXCL</code> flag in open(2)) ensures that <code>path</code> is newly\ncreated. On POSIX systems, <code>path</code> is considered to exist even if it is a symlink\nto a non-existent file. The exclusive flag may or may not work with network file\nsystems.</p>\n<p><code>flags</code> can also be a number as documented by open(2); commonly used constants\nare available from <code>fs.constants</code>.  On Windows, flags are translated to\ntheir equivalent ones where applicable, e.g. <code>O_WRONLY</code> to <code>FILE_GENERIC_WRITE</code>,\nor <code>O_EXCL|O_CREAT</code> to <code>CREATE_NEW</code>, as accepted by CreateFileW.</p>\n<p>On Linux, positional writes don&#39;t work when the file is opened in append mode.\nThe kernel ignores the position argument and always appends the data to\nthe end of the file.</p>\n<p><em>Note</em>: The behavior of <code>fs.open()</code> is platform-specific for some flags. As\nsuch, opening a directory on macOS and Linux with the <code>&#39;a+&#39;</code> flag - see example\nbelow - will return an error. In contrast, on Windows and FreeBSD, a file\ndescriptor will be returned.</p>\n<pre><code class=\"lang-js\">// macOS and Linux\nfs.open(&#39;&lt;directory&gt;&#39;, &#39;a+&#39;, (err, fd) =&gt; {\n  // =&gt; [Error: EISDIR: illegal operation on a directory, open &lt;directory&gt;]\n});\n\n// Windows and FreeBSD\nfs.open(&#39;&lt;directory&gt;&#39;, &#39;a+&#39;, (err, fd) =&gt; {\n  // =&gt; null, &lt;fd&gt;\n});\n</code></pre>\n"
        },
        {
          "textRaw": "fs.openSync(path, flags[, mode])",
          "type": "method",
          "name": "openSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`flags` {string|number} ",
                  "name": "flags",
                  "type": "string|number"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "flags"
                },
                {
                  "name": "mode",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"#fs_fs_open_path_flags_mode_callback\"><code>fs.open()</code></a>. Returns an integer representing the file\ndescriptor.</p>\n"
        },
        {
          "textRaw": "fs.read(fd, buffer, offset, length, position, callback)",
          "type": "method",
          "name": "read",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/10382",
                "description": "The `buffer` parameter can now be a `Uint8Array`."
              },
              {
                "version": "v6.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/4518",
                "description": "The `length` parameter can now be `0`."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`buffer` {Buffer|Uint8Array} ",
                  "name": "buffer",
                  "type": "Buffer|Uint8Array"
                },
                {
                  "textRaw": "`offset` {integer} ",
                  "name": "offset",
                  "type": "integer"
                },
                {
                  "textRaw": "`length` {integer} ",
                  "name": "length",
                  "type": "integer"
                },
                {
                  "textRaw": "`position` {integer} ",
                  "name": "position",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "buffer"
                },
                {
                  "name": "offset"
                },
                {
                  "name": "length"
                },
                {
                  "name": "position"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Read data from the file specified by <code>fd</code>.</p>\n<p><code>buffer</code> is the buffer that the data will be written to.</p>\n<p><code>offset</code> is the offset in the buffer to start writing at.</p>\n<p><code>length</code> is an integer specifying the number of bytes to read.</p>\n<p><code>position</code> is an integer specifying where to begin reading from in the file.\nIf <code>position</code> is <code>null</code>, data will be read from the current file position.</p>\n<p>The callback is given the three arguments, <code>(err, bytesRead, buffer)</code>.</p>\n<p>If this method is invoked as its <a href=\"util.html#util_util_promisify_original\"><code>util.promisify()</code></a>ed version, it returns\na Promise for an object with <code>bytesRead</code> and <code>buffer</code> properties.</p>\n"
        },
        {
          "textRaw": "fs.readdir(path[, options], callback)",
          "type": "method",
          "name": "readdir",
          "meta": {
            "added": [
              "v0.1.8"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v6.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/5616",
                "description": "The `options` parameter was added."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous readdir(3).  Reads the contents of a directory.\nThe callback gets two arguments <code>(err, files)</code> where <code>files</code> is an array of\nthe names of the files in the directory excluding <code>&#39;.&#39;</code> and <code>&#39;..&#39;</code>.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use for\nthe filenames passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>,\nthe filenames returned will be passed as <code>Buffer</code> objects.</p>\n"
        },
        {
          "textRaw": "fs.readdirSync(path[, options])",
          "type": "method",
          "name": "readdirSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous readdir(3). Returns an array of filenames excluding <code>&#39;.&#39;</code> and\n<code>&#39;..&#39;</code>.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use for\nthe filenames passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>,\nthe filenames returned will be passed as <code>Buffer</code> objects.</p>\n"
        },
        {
          "textRaw": "fs.readFile(path[, options], callback)",
          "type": "method",
          "name": "readFile",
          "meta": {
            "added": [
              "v0.1.29"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v5.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/3740",
                "description": "The `callback` will always be called with `null` as the `error` parameter in case of success."
              },
              {
                "version": "v5.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3163",
                "description": "The `path` parameter can be a file descriptor now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL|integer} filename or file descriptor ",
                  "name": "path",
                  "type": "string|Buffer|URL|integer",
                  "desc": "filename or file descriptor"
                },
                {
                  "textRaw": "`options` {Object|string} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string|null} default = `null` ",
                      "name": "encoding",
                      "type": "string|null",
                      "desc": "default = `null`"
                    },
                    {
                      "textRaw": "`flag` {string} default = `'r'` ",
                      "name": "flag",
                      "type": "string",
                      "desc": "default = `'r'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously reads the entire contents of a file. Example:</p>\n<pre><code class=\"lang-js\">fs.readFile(&#39;/etc/passwd&#39;, (err, data) =&gt; {\n  if (err) throw err;\n  console.log(data);\n});\n</code></pre>\n<p>The callback is passed two arguments <code>(err, data)</code>, where <code>data</code> is the\ncontents of the file.</p>\n<p>If no encoding is specified, then the raw buffer is returned.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding. Example:</p>\n<pre><code class=\"lang-js\">fs.readFile(&#39;/etc/passwd&#39;, &#39;utf8&#39;, callback);\n</code></pre>\n<p><em>Note</em>: When the path is a directory, the behavior of\n<code>fs.readFile()</code> and <a href=\"#fs_fs_readfilesync_path_options\"><code>fs.readFileSync()</code></a> is platform-specific. On macOS,\nLinux, and Windows, an error will be returned. On FreeBSD, a representation\nof the directory&#39;s contents will be returned.</p>\n<pre><code class=\"lang-js\">// macOS, Linux and Windows\nfs.readFile(&#39;&lt;directory&gt;&#39;, (err, data) =&gt; {\n  // =&gt; [Error: EISDIR: illegal operation on a directory, read &lt;directory&gt;]\n});\n\n//  FreeBSD\nfs.readFile(&#39;&lt;directory&gt;&#39;, (err, data) =&gt; {\n  // =&gt; null, &lt;data&gt;\n});\n</code></pre>\n<p>Any specified file descriptor has to support reading.</p>\n<p><em>Note</em>: If a file descriptor is specified as the <code>path</code>, it will not be closed\nautomatically.</p>\n"
        },
        {
          "textRaw": "fs.readFileSync(path[, options])",
          "type": "method",
          "name": "readFileSync",
          "meta": {
            "added": [
              "v0.1.8"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v5.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3163",
                "description": "The `path` parameter can be a file descriptor now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL|integer} filename or file descriptor ",
                  "name": "path",
                  "type": "string|Buffer|URL|integer",
                  "desc": "filename or file descriptor"
                },
                {
                  "textRaw": "`options` {Object|string} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string|null} default = `null` ",
                      "name": "encoding",
                      "type": "string|null",
                      "desc": "default = `null`"
                    },
                    {
                      "textRaw": "`flag` {string} default = `'r'` ",
                      "name": "flag",
                      "type": "string",
                      "desc": "default = `'r'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"#fs_fs_readfile_path_options_callback\"><code>fs.readFile()</code></a>. Returns the contents of the <code>path</code>.</p>\n<p>If the <code>encoding</code> option is specified then this function returns a\nstring. Otherwise it returns a buffer.</p>\n<p><em>Note</em>: Similar to <a href=\"#fs_fs_readfile_path_options_callback\"><code>fs.readFile()</code></a>, when the path is a directory, the\nbehavior of <code>fs.readFileSync()</code> is platform-specific.</p>\n<pre><code class=\"lang-js\">// macOS, Linux and Windows\nfs.readFileSync(&#39;&lt;directory&gt;&#39;);\n// =&gt; [Error: EISDIR: illegal operation on a directory, read &lt;directory&gt;]\n\n//  FreeBSD\nfs.readFileSync(&#39;&lt;directory&gt;&#39;); // =&gt; null, &lt;data&gt;\n</code></pre>\n"
        },
        {
          "textRaw": "fs.readlink(path[, options], callback)",
          "type": "method",
          "name": "readlink",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous readlink(2). The callback gets two arguments <code>(err,\nlinkString)</code>.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use for\nthe link path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>,\nthe link path returned will be passed as a <code>Buffer</code> object.</p>\n"
        },
        {
          "textRaw": "fs.readlinkSync(path[, options])",
          "type": "method",
          "name": "readlinkSync",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous readlink(2). Returns the symbolic link&#39;s string value.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use for\nthe link path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>,\nthe link path returned will be passed as a <code>Buffer</code> object.</p>\n"
        },
        {
          "textRaw": "fs.readSync(fd, buffer, offset, length, position)",
          "type": "method",
          "name": "readSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v6.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/4518",
                "description": "The `length` parameter can now be `0`."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`buffer` {string|Buffer|Uint8Array} ",
                  "name": "buffer",
                  "type": "string|Buffer|Uint8Array"
                },
                {
                  "textRaw": "`offset` {integer} ",
                  "name": "offset",
                  "type": "integer"
                },
                {
                  "textRaw": "`length` {integer} ",
                  "name": "length",
                  "type": "integer"
                },
                {
                  "textRaw": "`position` {integer} ",
                  "name": "position",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "buffer"
                },
                {
                  "name": "offset"
                },
                {
                  "name": "length"
                },
                {
                  "name": "position"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"#fs_fs_read_fd_buffer_offset_length_position_callback\"><code>fs.read()</code></a>. Returns the number of <code>bytesRead</code>.</p>\n"
        },
        {
          "textRaw": "fs.realpath(path[, options], callback)",
          "type": "method",
          "name": "realpath",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v8.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/13028",
                "description": "Pipe/Socket resolve support was added."
              },
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v6.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/7899",
                "description": "Calling `realpath` now works again for various edge cases on Windows."
              },
              {
                "version": "v6.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3594",
                "description": "The `cache` parameter was removed."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous realpath(3). The <code>callback</code> gets two arguments <code>(err,\nresolvedPath)</code>. May use <code>process.cwd</code> to resolve relative paths.</p>\n<p>Only paths that can be converted to UTF8 strings are supported.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use for\nthe path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>,\nthe path returned will be passed as a <code>Buffer</code> object.</p>\n<p><em>Note</em>: If <code>path</code> resolves to a socket or a pipe, the function will return a\nsystem dependent name for that object.</p>\n"
        },
        {
          "textRaw": "fs.realpathSync(path[, options])",
          "type": "method",
          "name": "realpathSync",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v8.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/13028",
                "description": "Pipe/Socket resolve support was added."
              },
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v6.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/7899",
                "description": "Calling `realpathSync` now works again for various edge cases on Windows."
              },
              {
                "version": "v6.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3594",
                "description": "The `cache` parameter was removed."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous realpath(3). Returns the resolved path.</p>\n<p>Only paths that can be converted to UTF8 strings are supported.</p>\n<p>The optional <code>options</code> argument can be a string specifying an encoding, or an\nobject with an <code>encoding</code> property specifying the character encoding to use for\nthe returned value. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the path returned\nwill be passed as a <code>Buffer</code> object.</p>\n<p><em>Note</em>: If <code>path</code> resolves to a socket or a pipe, the function will return a\nsystem dependent name for that object.</p>\n"
        },
        {
          "textRaw": "fs.rename(oldPath, newPath, callback)",
          "type": "method",
          "name": "rename",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `oldPath` and `newPath` parameters can be WHATWG `URL` objects using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`oldPath` {string|Buffer|URL} ",
                  "name": "oldPath",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`newPath` {string|Buffer|URL} ",
                  "name": "newPath",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "oldPath"
                },
                {
                  "name": "newPath"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous rename(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.renameSync(oldPath, newPath)",
          "type": "method",
          "name": "renameSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `oldPath` and `newPath` parameters can be WHATWG `URL` objects using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`oldPath` {string|Buffer|URL} ",
                  "name": "oldPath",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`newPath` {string|Buffer|URL} ",
                  "name": "newPath",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "oldPath"
                },
                {
                  "name": "newPath"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous rename(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.rmdir(path, callback)",
          "type": "method",
          "name": "rmdir",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameters can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous rmdir(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.rmdirSync(path)",
          "type": "method",
          "name": "rmdirSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameters can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous rmdir(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.stat(path, callback)",
          "type": "method",
          "name": "stat",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous stat(2). The callback gets two arguments <code>(err, stats)</code> where\n<code>stats</code> is an <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object.</p>\n<p>In case of an error, the <code>err.code</code> will be one of <a href=\"errors.html#errors_common_system_errors\">Common System Errors</a>.</p>\n<p>Using <code>fs.stat()</code> to check for the existence of a file before calling\n<code>fs.open()</code>, <code>fs.readFile()</code> or <code>fs.writeFile()</code> is not recommended.\nInstead, user code should open/read/write the file directly and handle the\nerror raised if the file is not available.</p>\n<p>To check if a file exists without manipulating it afterwards, <a href=\"#fs_fs_access_path_mode_callback\"><code>fs.access()</code></a>\nis recommended.</p>\n"
        },
        {
          "textRaw": "fs.statSync(path)",
          "type": "method",
          "name": "statSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous stat(2). Returns an instance of <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a>.</p>\n"
        },
        {
          "textRaw": "fs.symlink(target, path[, type], callback)",
          "type": "method",
          "name": "symlink",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `target` and `path` parameters can be WHATWG `URL` objects using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`target` {string|Buffer|URL} ",
                  "name": "target",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`type` {string} ",
                  "name": "type",
                  "type": "string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "target"
                },
                {
                  "name": "path"
                },
                {
                  "name": "type",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous symlink(2). No arguments other than a possible exception are given\nto the completion callback. The <code>type</code> argument can be set to <code>&#39;dir&#39;</code>,\n<code>&#39;file&#39;</code>, or <code>&#39;junction&#39;</code> (default is <code>&#39;file&#39;</code>) and is only available on\nWindows (ignored on other platforms). Note that Windows junction points require\nthe destination path to be absolute. When using <code>&#39;junction&#39;</code>, the <code>target</code>\nargument will automatically be normalized to absolute path.</p>\n<p>Here is an example below:</p>\n<pre><code class=\"lang-js\">fs.symlink(&#39;./foo&#39;, &#39;./new-port&#39;, callback);\n</code></pre>\n<p>It creates a symbolic link named &quot;new-port&quot; that points to &quot;foo&quot;.</p>\n"
        },
        {
          "textRaw": "fs.symlinkSync(target, path[, type])",
          "type": "method",
          "name": "symlinkSync",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `target` and `path` parameters can be WHATWG `URL` objects using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`target` {string|Buffer|URL} ",
                  "name": "target",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`type` {string} ",
                  "name": "type",
                  "type": "string",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "target"
                },
                {
                  "name": "path"
                },
                {
                  "name": "type",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous symlink(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.truncate(path, len, callback)",
          "type": "method",
          "name": "truncate",
          "meta": {
            "added": [
              "v0.8.6"
            ],
            "changes": [
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer} ",
                  "name": "path",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`len` {integer} default = `0` ",
                  "name": "len",
                  "type": "integer",
                  "desc": "default = `0`"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "len"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous truncate(2). No arguments other than a possible exception are\ngiven to the completion callback. A file descriptor can also be passed as the\nfirst argument. In this case, <code>fs.ftruncate()</code> is called.</p>\n"
        },
        {
          "textRaw": "fs.truncateSync(path, len)",
          "type": "method",
          "name": "truncateSync",
          "meta": {
            "added": [
              "v0.8.6"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer} ",
                  "name": "path",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`len` {integer} default = `0` ",
                  "name": "len",
                  "type": "integer",
                  "desc": "default = `0`"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "len"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous truncate(2). Returns <code>undefined</code>. A file descriptor can also be\npassed as the first argument. In this case, <code>fs.ftruncateSync()</code> is called.</p>\n"
        },
        {
          "textRaw": "fs.unlink(path, callback)",
          "type": "method",
          "name": "unlink",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronous unlink(2). No arguments other than a possible exception are given\nto the completion callback.</p>\n"
        },
        {
          "textRaw": "fs.unlinkSync(path)",
          "type": "method",
          "name": "unlinkSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous unlink(2). Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.unwatchFile(filename[, listener])",
          "type": "method",
          "name": "unwatchFile",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`filename` {string|Buffer} ",
                  "name": "filename",
                  "type": "string|Buffer"
                },
                {
                  "textRaw": "`listener` {Function} ",
                  "name": "listener",
                  "type": "Function",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "filename"
                },
                {
                  "name": "listener",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Stop watching for changes on <code>filename</code>. If <code>listener</code> is specified, only that\nparticular listener is removed. Otherwise, <em>all</em> listeners are removed,\neffectively stopping watching of <code>filename</code>.</p>\n<p>Calling <code>fs.unwatchFile()</code> with a filename that is not being watched is a\nno-op, not an error.</p>\n<p><em>Note</em>: <a href=\"#fs_fs_watch_filename_options_listener\"><code>fs.watch()</code></a> is more efficient than <code>fs.watchFile()</code> and\n<code>fs.unwatchFile()</code>.  <code>fs.watch()</code> should be used instead of <code>fs.watchFile()</code>\nand <code>fs.unwatchFile()</code> when possible.</p>\n"
        },
        {
          "textRaw": "fs.utimes(path, atime, mtime, callback)",
          "type": "method",
          "name": "utimes",
          "meta": {
            "added": [
              "v0.4.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v4.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/2387",
                "description": "Numeric strings, `NaN` and `Infinity` are now allowed time specifiers."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`atime` {integer} ",
                  "name": "atime",
                  "type": "integer"
                },
                {
                  "textRaw": "`mtime` {integer} ",
                  "name": "mtime",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "atime"
                },
                {
                  "name": "mtime"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Change file timestamps of the file referenced by the supplied path.</p>\n<p><em>Note</em>: The arguments <code>atime</code> and <code>mtime</code> of the following related functions\nfollow these rules:</p>\n<ul>\n<li>The value should be a Unix timestamp in seconds. For example, <code>Date.now()</code>\nreturns milliseconds, so it should be divided by 1000 before passing it in.</li>\n<li>If the value is a numeric string like <code>&#39;123456789&#39;</code>, the value will get\nconverted to the corresponding number.</li>\n<li>If the value is <code>NaN</code>, <code>Infinity</code> or <code>-Infinity</code>, an Error will be thrown.</li>\n</ul>\n"
        },
        {
          "textRaw": "fs.utimesSync(path, atime, mtime)",
          "type": "method",
          "name": "utimesSync",
          "meta": {
            "added": [
              "v0.4.2"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `path` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v4.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/2387",
                "description": "Numeric strings, `NaN` and `Infinity` are now allowed time specifiers."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`atime` {integer} ",
                  "name": "atime",
                  "type": "integer"
                },
                {
                  "textRaw": "`mtime` {integer} ",
                  "name": "mtime",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "atime"
                },
                {
                  "name": "mtime"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous version of <a href=\"#fs_fs_utimes_path_atime_mtime_callback\"><code>fs.utimes()</code></a>. Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.watch(filename[, options][, listener])",
          "type": "method",
          "name": "watch",
          "meta": {
            "added": [
              "v0.5.10"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `filename` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7831",
                "description": "The passed `options` object will never be modified."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`filename` {string|Buffer|URL} ",
                  "name": "filename",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`persistent` {boolean} Indicates whether the process should continue to run as long as files are being watched. default = `true` ",
                      "name": "persistent",
                      "type": "boolean",
                      "desc": "Indicates whether the process should continue to run as long as files are being watched. default = `true`"
                    },
                    {
                      "textRaw": "`recursive` {boolean} Indicates whether all subdirectories should be watched, or only the current directory. This applies when a directory is specified, and only on supported platforms (See [Caveats][]). default = `false` ",
                      "name": "recursive",
                      "type": "boolean",
                      "desc": "Indicates whether all subdirectories should be watched, or only the current directory. This applies when a directory is specified, and only on supported platforms (See [Caveats][]). default = `false`"
                    },
                    {
                      "textRaw": "`encoding` {string} Specifies the character encoding to be used for the  filename passed to the listener. default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "desc": "Specifies the character encoding to be used for the  filename passed to the listener. default = `'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`listener` {Function} ",
                  "name": "listener",
                  "type": "Function",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "filename"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "listener",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Watch for changes on <code>filename</code>, where <code>filename</code> is either a file or a\ndirectory.  The returned object is a <a href=\"#fs_class_fs_fswatcher\"><code>fs.FSWatcher</code></a>.</p>\n<p>The second argument is optional. If <code>options</code> is provided as a string, it\nspecifies the <code>encoding</code>. Otherwise <code>options</code> should be passed as an object.</p>\n<p>The listener callback gets two arguments <code>(eventType, filename)</code>.  <code>eventType</code> is either\n<code>&#39;rename&#39;</code> or <code>&#39;change&#39;</code>, and <code>filename</code> is the name of the file which triggered\nthe event.</p>\n<p>Note that on most platforms, <code>&#39;rename&#39;</code> is emitted whenever a filename appears\nor disappears in the directory.</p>\n<p>Also note the listener callback is attached to the <code>&#39;change&#39;</code> event fired by\n<a href=\"#fs_class_fs_fswatcher\"><code>fs.FSWatcher</code></a>, but it is not the same thing as the <code>&#39;change&#39;</code> value of\n<code>eventType</code>.</p>\n",
          "miscs": [
            {
              "textRaw": "Caveats",
              "name": "Caveats",
              "type": "misc",
              "desc": "<p>The <code>fs.watch</code> API is not 100% consistent across platforms, and is\nunavailable in some situations.</p>\n<p>The recursive option is only supported on macOS and Windows.</p>\n",
              "miscs": [
                {
                  "textRaw": "Availability",
                  "name": "Availability",
                  "type": "misc",
                  "desc": "<p>This feature depends on the underlying operating system providing a way\nto be notified of filesystem changes.</p>\n<ul>\n<li>On Linux systems, this uses <a href=\"http://man7.org/linux/man-pages/man7/inotify.7.html\"><code>inotify</code></a></li>\n<li>On BSD systems, this uses <a href=\"https://www.freebsd.org/cgi/man.cgi?kqueue\"><code>kqueue</code></a></li>\n<li>On macOS, this uses <a href=\"https://www.freebsd.org/cgi/man.cgi?kqueue\"><code>kqueue</code></a> for files and <a href=\"https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005289-CH1-SW1\"><code>FSEvents</code></a> for directories.</li>\n<li>On SunOS systems (including Solaris and SmartOS), this uses <a href=\"http://illumos.org/man/port_create\"><code>event ports</code></a>.</li>\n<li>On Windows systems, this feature depends on <a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/aa365465%28v=vs.85%29.aspx\"><code>ReadDirectoryChangesW</code></a>.</li>\n<li>On Aix systems, this feature depends on <a href=\"https://www.ibm.com/developerworks/aix/library/au-aix_event_infrastructure/\"><code>AHAFS</code></a>, which must be enabled.</li>\n</ul>\n<p>If the underlying functionality is not available for some reason, then\n<code>fs.watch</code> will not be able to function. For example, watching files or\ndirectories can be unreliable, and in some cases impossible, on network file\nsystems (NFS, SMB, etc), or host file systems when using virtualization software\nsuch as Vagrant, Docker, etc.</p>\n<p>It is still possible to use <code>fs.watchFile()</code>, which uses stat polling, but\nthis method is slower and less reliable.</p>\n"
                },
                {
                  "textRaw": "Inodes",
                  "name": "Inodes",
                  "type": "misc",
                  "desc": "<p>On Linux and macOS systems, <code>fs.watch()</code> resolves the path to an <a href=\"https://en.wikipedia.org/wiki/Inode\">inode</a> and\nwatches the inode. If the watched path is deleted and recreated, it is assigned\na new inode. The watch will emit an event for the delete but will continue\nwatching the <em>original</em> inode. Events for the new inode will not be emitted.\nThis is expected behavior.</p>\n<p>In AIX, save and close of a file being watched causes two notifications -\none for adding new content, and one for truncation. Moreover, save and\nclose operations on some platforms cause inode changes that force watch\noperations to become invalid and ineffective. AIX retains inode for the\nlifetime of a file, that way though this is different from Linux / macOS,\nthis improves the usability of file watching. This is expected behavior.</p>\n"
                },
                {
                  "textRaw": "Filename Argument",
                  "name": "Filename Argument",
                  "type": "misc",
                  "desc": "<p>Providing <code>filename</code> argument in the callback is only supported on Linux,\nmacOS, Windows, and AIX.  Even on supported platforms, <code>filename</code> is not always\nguaranteed to be provided. Therefore, don&#39;t assume that <code>filename</code> argument is\nalways provided in the callback, and have some fallback logic if it is null.</p>\n<pre><code class=\"lang-js\">fs.watch(&#39;somedir&#39;, (eventType, filename) =&gt; {\n  console.log(`event type is: ${eventType}`);\n  if (filename) {\n    console.log(`filename provided: ${filename}`);\n  } else {\n    console.log(&#39;filename not provided&#39;);\n  }\n});\n</code></pre>\n"
                }
              ]
            }
          ]
        },
        {
          "textRaw": "fs.watchFile(filename[, options], listener)",
          "type": "method",
          "name": "watchFile",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": [
              {
                "version": "v7.6.0",
                "pr-url": "https://github.com/nodejs/node/pull/10739",
                "description": "The `filename` parameter can be a WHATWG `URL` object using `file:` protocol. Support is currently still *experimental*."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`filename` {string|Buffer|URL} ",
                  "name": "filename",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {Object} ",
                  "options": [
                    {
                      "textRaw": "`persistent` {boolean} ",
                      "name": "persistent",
                      "type": "boolean"
                    },
                    {
                      "textRaw": "`interval` {integer} ",
                      "name": "interval",
                      "type": "integer"
                    }
                  ],
                  "name": "options",
                  "type": "Object",
                  "optional": true
                },
                {
                  "textRaw": "`listener` {Function} ",
                  "name": "listener",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "filename"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "listener"
                }
              ]
            }
          ],
          "desc": "<p>Watch for changes on <code>filename</code>. The callback <code>listener</code> will be called each\ntime the file is accessed.</p>\n<p>The <code>options</code> argument may be omitted. If provided, it should be an object. The\n<code>options</code> object may contain a boolean named <code>persistent</code> that indicates\nwhether the process should continue to run as long as files are being watched.\nThe <code>options</code> object may specify an <code>interval</code> property indicating how often the\ntarget should be polled in milliseconds. The default is\n<code>{ persistent: true, interval: 5007 }</code>.</p>\n<p>The <code>listener</code> gets two arguments the current stat object and the previous\nstat object:</p>\n<pre><code class=\"lang-js\">fs.watchFile(&#39;message.text&#39;, (curr, prev) =&gt; {\n  console.log(`the current mtime is: ${curr.mtime}`);\n  console.log(`the previous mtime was: ${prev.mtime}`);\n});\n</code></pre>\n<p>These stat objects are instances of <code>fs.Stat</code>.</p>\n<p>To be notified when the file was modified, not just accessed, it is necessary\nto compare <code>curr.mtime</code> and <code>prev.mtime</code>.</p>\n<p><em>Note</em>: When an <code>fs.watchFile</code> operation results in an <code>ENOENT</code> error, it\nwill invoke the listener once, with all the fields zeroed (or, for dates, the\nUnix Epoch). In Windows, <code>blksize</code> and <code>blocks</code> fields will be <code>undefined</code>,\ninstead of zero. If the file is created later on, the listener will be called\nagain, with the latest stat objects. This is a change in functionality since\nv0.10.</p>\n<p><em>Note</em>: <a href=\"#fs_fs_watch_filename_options_listener\"><code>fs.watch()</code></a> is more efficient than <code>fs.watchFile</code> and\n<code>fs.unwatchFile</code>. <code>fs.watch</code> should be used instead of <code>fs.watchFile</code> and\n<code>fs.unwatchFile</code> when possible.</p>\n"
        },
        {
          "textRaw": "fs.write(fd, buffer[, offset[, length[, position]]], callback)",
          "type": "method",
          "name": "write",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "v7.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/10382",
                "description": "The `buffer` parameter can now be a `Uint8Array`."
              },
              {
                "version": "v7.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/7856",
                "description": "The `offset` and `length` parameters are optional now."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`buffer` {Buffer|Uint8Array} ",
                  "name": "buffer",
                  "type": "Buffer|Uint8Array"
                },
                {
                  "textRaw": "`offset` {integer} ",
                  "name": "offset",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`length` {integer} ",
                  "name": "length",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`position` {integer} ",
                  "name": "position",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "buffer"
                },
                {
                  "name": "offset",
                  "optional": true
                },
                {
                  "name": "length",
                  "optional": true
                },
                {
                  "name": "position",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Write <code>buffer</code> to the file specified by <code>fd</code>.</p>\n<p><code>offset</code> determines the part of the buffer to be written, and <code>length</code> is\nan integer specifying the number of bytes to write.</p>\n<p><code>position</code> refers to the offset from the beginning of the file where this data\nshould be written. If <code>typeof position !== &#39;number&#39;</code>, the data will be written\nat the current position. See pwrite(2).</p>\n<p>The callback will be given three arguments <code>(err, bytesWritten, buffer)</code> where\n<code>bytesWritten</code> specifies how many <em>bytes</em> were written from <code>buffer</code>.</p>\n<p>If this method is invoked as its <a href=\"util.html#util_util_promisify_original\"><code>util.promisify()</code></a>ed version, it returns\na Promise for an object with <code>bytesWritten</code> and <code>buffer</code> properties.</p>\n<p>Note that it is unsafe to use <code>fs.write</code> multiple times on the same file\nwithout waiting for the callback. For this scenario,\n<code>fs.createWriteStream</code> is strongly recommended.</p>\n<p>On Linux, positional writes don&#39;t work when the file is opened in append mode.\nThe kernel ignores the position argument and always appends the data to\nthe end of the file.</p>\n"
        },
        {
          "textRaw": "fs.write(fd, string[, position[, encoding]], callback)",
          "type": "method",
          "name": "write",
          "meta": {
            "added": [
              "v0.11.5"
            ],
            "changes": [
              {
                "version": "v7.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/7856",
                "description": "The `position` parameter is optional now."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`string` {string} ",
                  "name": "string",
                  "type": "string"
                },
                {
                  "textRaw": "`position` {integer} ",
                  "name": "position",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`encoding` {string} ",
                  "name": "encoding",
                  "type": "string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "string"
                },
                {
                  "name": "position",
                  "optional": true
                },
                {
                  "name": "encoding",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Write <code>string</code> to the file specified by <code>fd</code>.  If <code>string</code> is not a string, then\nthe value will be coerced to one.</p>\n<p><code>position</code> refers to the offset from the beginning of the file where this data\nshould be written. If <code>typeof position !== &#39;number&#39;</code> the data will be written at\nthe current position. See pwrite(2).</p>\n<p><code>encoding</code> is the expected string encoding.</p>\n<p>The callback will receive the arguments <code>(err, written, string)</code> where <code>written</code>\nspecifies how many <em>bytes</em> the passed string required to be written. Note that\nbytes written is not the same as string characters. See <a href=\"buffer.html#buffer_class_method_buffer_bytelength_string_encoding\"><code>Buffer.byteLength</code></a>.</p>\n<p>Unlike when writing <code>buffer</code>, the entire string must be written. No substring\nmay be specified. This is because the byte offset of the resulting data may not\nbe the same as the string offset.</p>\n<p>Note that it is unsafe to use <code>fs.write</code> multiple times on the same file\nwithout waiting for the callback. For this scenario,\n<code>fs.createWriteStream</code> is strongly recommended.</p>\n<p>On Linux, positional writes don&#39;t work when the file is opened in append mode.\nThe kernel ignores the position argument and always appends the data to\nthe end of the file.</p>\n"
        },
        {
          "textRaw": "fs.writeFile(file, data[, options], callback)",
          "type": "method",
          "name": "writeFile",
          "meta": {
            "added": [
              "v0.1.29"
            ],
            "changes": [
              {
                "version": "v7.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/10382",
                "description": "The `data` parameter can now be a `Uint8Array`."
              },
              {
                "version": "v7.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/7897",
                "description": "The `callback` parameter is no longer optional. Not passing it will emit a deprecation warning."
              },
              {
                "version": "v5.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3163",
                "description": "The `file` parameter can be a file descriptor now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`file` {string|Buffer|integer} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|integer",
                  "desc": "filename or file descriptor"
                },
                {
                  "textRaw": "`data` {string|Buffer|Uint8Array} ",
                  "name": "data",
                  "type": "string|Buffer|Uint8Array"
                },
                {
                  "textRaw": "`options` {Object|string} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string|null} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string|null",
                      "desc": "default = `'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} default = `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "desc": "default = `0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} default = `'w'` ",
                      "name": "flag",
                      "type": "string",
                      "desc": "default = `'w'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "file"
                },
                {
                  "name": "data"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously writes data to a file, replacing the file if it already exists.\n<code>data</code> can be a string or a buffer.</p>\n<p>The <code>encoding</code> option is ignored if <code>data</code> is a buffer. It defaults\nto <code>&#39;utf8&#39;</code>.</p>\n<p>Example:</p>\n<pre><code class=\"lang-js\">fs.writeFile(&#39;message.txt&#39;, &#39;Hello Node.js&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;The file has been saved!&#39;);\n});\n</code></pre>\n<p>If <code>options</code> is a string, then it specifies the encoding. Example:</p>\n<pre><code class=\"lang-js\">fs.writeFile(&#39;message.txt&#39;, &#39;Hello Node.js&#39;, &#39;utf8&#39;, callback);\n</code></pre>\n<p>Any specified file descriptor has to support writing.</p>\n<p>Note that it is unsafe to use <code>fs.writeFile</code> multiple times on the same file\nwithout waiting for the callback. For this scenario,\n<code>fs.createWriteStream</code> is strongly recommended.</p>\n<p><em>Note</em>: If a file descriptor is specified as the <code>file</code>, it will not be closed\nautomatically.</p>\n"
        },
        {
          "textRaw": "fs.writeFileSync(file, data[, options])",
          "type": "method",
          "name": "writeFileSync",
          "meta": {
            "added": [
              "v0.1.29"
            ],
            "changes": [
              {
                "version": "v7.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/10382",
                "description": "The `data` parameter can now be a `Uint8Array`."
              },
              {
                "version": "v5.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/3163",
                "description": "The `file` parameter can be a file descriptor now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`file` {string|Buffer|integer} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|integer",
                  "desc": "filename or file descriptor"
                },
                {
                  "textRaw": "`data` {string|Buffer|Uint8Array} ",
                  "name": "data",
                  "type": "string|Buffer|Uint8Array"
                },
                {
                  "textRaw": "`options` {Object|string} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string|null} default = `'utf8'` ",
                      "name": "encoding",
                      "type": "string|null",
                      "desc": "default = `'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} default = `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "desc": "default = `0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} default = `'w'` ",
                      "name": "flag",
                      "type": "string",
                      "desc": "default = `'w'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "file"
                },
                {
                  "name": "data"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The synchronous version of <a href=\"#fs_fs_writefile_file_data_options_callback\"><code>fs.writeFile()</code></a>. Returns <code>undefined</code>.</p>\n"
        },
        {
          "textRaw": "fs.writeSync(fd, buffer[, offset[, length[, position]]])",
          "type": "method",
          "name": "writeSync",
          "meta": {
            "added": [
              "v0.1.21"
            ],
            "changes": [
              {
                "version": "v7.4.0",
                "pr-url": "https://github.com/nodejs/node/pull/10382",
                "description": "The `buffer` parameter can now be a `Uint8Array`."
              },
              {
                "version": "v7.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/7856",
                "description": "The `offset` and `length` parameters are optional now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`buffer` {Buffer|Uint8Array} ",
                  "name": "buffer",
                  "type": "Buffer|Uint8Array"
                },
                {
                  "textRaw": "`offset` {integer} ",
                  "name": "offset",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`length` {integer} ",
                  "name": "length",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`position` {integer} ",
                  "name": "position",
                  "type": "integer",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "buffer"
                },
                {
                  "name": "offset",
                  "optional": true
                },
                {
                  "name": "length",
                  "optional": true
                },
                {
                  "name": "position",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous versions of <a href=\"#fs_fs_write_fd_buffer_offset_length_position_callback\"><code>fs.write()</code></a>. Returns the number of bytes written.</p>\n"
        },
        {
          "textRaw": "fs.writeSync(fd, string[, position[, encoding]])",
          "type": "method",
          "name": "writeSync",
          "meta": {
            "added": [
              "v0.11.5"
            ],
            "changes": [
              {
                "version": "v7.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/7856",
                "description": "The `position` parameter is optional now."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`string` {string} ",
                  "name": "string",
                  "type": "string"
                },
                {
                  "textRaw": "`position` {integer} ",
                  "name": "position",
                  "type": "integer",
                  "optional": true
                },
                {
                  "textRaw": "`encoding` {string} ",
                  "name": "encoding",
                  "type": "string",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "string"
                },
                {
                  "name": "position",
                  "optional": true
                },
                {
                  "name": "encoding",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous versions of <a href=\"#fs_fs_write_fd_buffer_offset_length_position_callback\"><code>fs.write()</code></a>. Returns the number of bytes written.</p>\n"
        }
      ],
      "properties": [
        {
          "textRaw": "fs.constants",
          "name": "constants",
          "desc": "<p>Returns an object containing commonly used constants for file system\noperations. The specific constants currently defined are described in\n<a href=\"#fs_fs_constants_1\">FS Constants</a>.</p>\n"
        }
      ],
      "type": "module",
      "displayName": "fs"
    }
  ]
}
