{
  "source": "doc/api/fs.md",
  "modules": [
    {
      "textRaw": "File System",
      "name": "fs",
      "introduced_in": "v0.10.0",
      "stability": 2,
      "stabilityText": "Stable",
      "desc": "<p>The <code>fs</code> module provides an API for interacting with the file system in a\nmanner closely modeled around standard POSIX functions.</p>\n<p>To use this module:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n</code></pre>\n<p>All file system operations have synchronous and asynchronous 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<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>Exceptions that occur using synchronous operations are thrown immediately and\nmay be handled using <code>try</code>/<code>catch</code>, or may be allowed to bubble up.</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\ntry {\n  fs.unlinkSync(&#39;/tmp/hello&#39;);\n  console.log(&#39;successfully deleted /tmp/hello&#39;);\n} catch (err) {\n  // handle the error\n}\n</code></pre>\n<p>Note that there is no guaranteed ordering when using asynchronous methods.\nSo the following is prone to error because the <code>fs.stat()</code> operation may\ncomplete before the <code>fs.rename()</code> operation.</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>To correctly order the operations, move the <code>fs.stat()</code> call into the callback\nof the <code>fs.rename()</code> operation:</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>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>Omitting the callback function on asynchronous fs functions is deprecated and\nmay 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",
      "modules": [
        {
          "textRaw": "File paths",
          "name": "file_paths",
          "desc": "<p>Most <code>fs</code> operations accept filepaths that may be specified in the form of\na string, a <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>, or a <a href=\"url.html#url_the_whatwg_url_api\"><code>URL</code></a> object using the <code>file:</code> protocol.</p>\n<p>String form paths are interpreted as UTF-8 character sequences identifying\nthe absolute or relative filename. Relative paths will be resolved relative\nto the current working directory as specified by <code>process.cwd()</code>.</p>\n<p>Example using an absolute path on POSIX:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\nfs.open(&#39;/open/some/file.txt&#39;, &#39;r&#39;, (err, fd) =&gt; {\n  if (err) throw err;\n  fs.close(fd, (err) =&gt; {\n    if (err) throw err;\n  });\n});\n</code></pre>\n<p>Example using a relative path on POSIX (relative to <code>process.cwd()</code>):</p>\n<pre><code class=\"lang-js\">fs.open(&#39;file.txt&#39;, &#39;r&#39;, (err, fd) =&gt; {\n  if (err) throw err;\n  fs.close(fd, (err) =&gt; {\n    if (err) throw err;\n  });\n});\n</code></pre>\n<p>Paths specified using a <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a> are useful primarily on certain POSIX\noperating systems that treat file paths as opaque byte sequences. On such\nsystems, it is possible for a single file path to contain sub-sequences that\nuse multiple character encodings. As with string paths, <code>Buffer</code> paths may\nbe relative or absolute:</p>\n<p>Example using an absolute path on POSIX:</p>\n<pre><code class=\"lang-js\">fs.open(Buffer.from(&#39;/open/some/file.txt&#39;), &#39;r&#39;, (err, fd) =&gt; {\n  if (err) throw err;\n  fs.close(fd, (err) =&gt; {\n    if (err) throw err;\n  });\n});\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": "URL object support",
              "name": "url_object_support",
              "meta": {
                "added": [
                  "v7.6.0"
                ],
                "changes": []
              },
              "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 fileUrl = new URL(&#39;file:///tmp/hello&#39;);\n\nfs.readFileSync(fileUrl);\n</code></pre>\n<p><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><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": "URL object support"
            }
          ],
          "type": "module",
          "displayName": "File paths"
        },
        {
          "textRaw": "File Descriptors",
          "name": "file_descriptors",
          "desc": "<p>On POSIX systems, for every process, the kernel maintains a table of currently\nopen files and resources. Each open file is assigned a simple numeric\nidentifier called a <em>file descriptor</em>. At the system-level, all file system\noperations use these file descriptors to identify and track each specific\nfile. Windows systems use a different but conceptually similar mechanism for\ntracking resources. To simplify things for users, Node.js abstracts away the\nspecific differences between operating systems and assigns all open files a\nnumeric file descriptor.</p>\n<p>The <code>fs.open()</code> method is used to allocate a new file descriptor. Once\nallocated, the file descriptor may be used to read data from, write data to,\nor request information about the file.</p>\n<pre><code class=\"lang-js\">fs.open(&#39;/open/some/file.txt&#39;, &#39;r&#39;, (err, fd) =&gt; {\n  if (err) throw err;\n  fs.fstat(fd, (err, stat) =&gt; {\n    if (err) throw err;\n    // use stat\n\n    // always close the file descriptor!\n    fs.close(fd, (err) =&gt; {\n      if (err) throw err;\n    });\n  });\n});\n</code></pre>\n<p>Most operating systems limit the number of file descriptors that may be open\nat any given time so it is critical to close the descriptor when operations\nare completed. Failure to do so will result in a memory leak that will\neventually cause an application to crash.</p>\n",
          "type": "module",
          "displayName": "File Descriptors"
        },
        {
          "textRaw": "Threadpool Usage",
          "name": "threadpool_usage",
          "desc": "<p>Note that all file system APIs except <code>fs.FSWatcher()</code> and those that are\nexplicitly synchronous use libuv&#39;s threadpool, which can have surprising and\nnegative performance implications for some applications, see the\n<a href=\"cli.html#cli_uv_threadpool_size_size\"><code>UV_THREADPOOL_SIZE</code></a> documentation for more information.</p>\n",
          "type": "module",
          "displayName": "Threadpool Usage"
        },
        {
          "textRaw": "fs.realpath.native(path[, options], callback)",
          "name": "fs.realpath.native(path[,_options],_callback)",
          "meta": {
            "added": [
              "v9.2.0"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li><code>path</code> {string|Buffer|URL}</li>\n<li><code>options</code> {string|Object}<ul>\n<li><code>encoding</code> {string} <strong>Default:</strong> <code>&#39;utf8&#39;</code></li>\n</ul>\n</li>\n<li><code>callback</code> {Function}<ul>\n<li><code>err</code> {Error}</li>\n<li><code>resolvedPath</code> {string|Buffer}</li>\n</ul>\n</li>\n</ul>\n<p>Asynchronous realpath(3).</p>\n<p>The <code>callback</code> gets two arguments <code>(err, resolvedPath)</code>.</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>On Linux, when Node.js is linked against musl libc, the procfs file system must\nbe mounted on <code>/proc</code> in order for this function to work. Glibc does not have\nthis restriction.</p>\n",
          "type": "module",
          "displayName": "fs.realpath.native(path[, options], callback)"
        },
        {
          "textRaw": "fs.realpathSync.native(path[, options])",
          "name": "fs.realpathsync.native(path[,_options])",
          "meta": {
            "added": [
              "v9.2.0"
            ],
            "changes": []
          },
          "desc": "<ul>\n<li><code>path</code> {string|Buffer|URL}</li>\n<li><code>options</code> {string|Object}<ul>\n<li><code>encoding</code> {string} <strong>Default:</strong> <code>&#39;utf8&#39;</code></li>\n</ul>\n</li>\n<li>Returns: {string|Buffer}</li>\n</ul>\n<p>Synchronous realpath(3).</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>On Linux, when Node.js is linked against musl libc, the procfs file system must\nbe mounted on <code>/proc</code> in order for this function to work. Glibc does not have\nthis restriction.</p>\n",
          "type": "module",
          "displayName": "fs.realpathSync.native(path[, options])"
        },
        {
          "textRaw": "fs Promises API",
          "name": "fs_promises_api",
          "stability": 1,
          "stabilityText": "Experimental",
          "desc": "<p>The <code>fs/promises</code> API provides an alternative set of asynchronous file system\nmethods that return <code>Promise</code> objects rather than using callbacks. The\nAPI is accessible via <code>require(&#39;fs/promises&#39;)</code>.</p>\n",
          "classes": [
            {
              "textRaw": "class: FileHandle",
              "type": "class",
              "name": "FileHandle",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "desc": "<p>A <code>FileHandle</code> object is a wrapper for a numeric file descriptor.\nInstances of <code>FileHandle</code> are distinct from numeric file descriptors\nin that, if the <code>FileHandle</code> is not explicitly closed using the\n<code>filehandle.close()</code> method, they will automatically close the file descriptor\nand will emit a process warning, thereby helping to prevent memory leaks.</p>\n<p>Instances of the <code>FileHandle</code> object are created internally by the\n<code>fsPromises.open()</code> method.</p>\n<p>Unlike callback-based such as <code>fs.fstat()</code>, <code>fs.fchown()</code>, <code>fs.fchmod()</code>,\n<code>fs.ftruncate()</code>, <code>fs.read()</code>, and <code>fs.write()</code>, operations — all of which\nuse a simple numeric file descriptor, all <code>fsPromises.*</code> variations use the\n<code>FileHandle</code> class in order to help protect against accidental leaking of\nunclosed file descriptors after a <code>Promise</code> is resolved or rejected.</p>\n",
              "methods": [
                {
                  "textRaw": "filehandle.appendFile(data, options)",
                  "type": "method",
                  "name": "appendFile",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "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",
                              "default": "`'utf8'`"
                            },
                            {
                              "textRaw": "`mode` {integer} **Default:** `0o666` ",
                              "name": "mode",
                              "type": "integer",
                              "default": "`0o666`"
                            },
                            {
                              "textRaw": "`flag` {string} **Default:** `'a'` ",
                              "name": "flag",
                              "type": "string",
                              "default": "`'a'`"
                            }
                          ],
                          "name": "options",
                          "type": "Object|string"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "data"
                        },
                        {
                          "name": "options"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Asynchronously append data to this file, creating the file if it does not yet\nexist. <code>data</code> can be a string or a <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>. The <code>Promise</code> will be\nresolved with no arguments upon success.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n<p>The <code>FileHandle</code> must have been opened for appending.</p>\n"
                },
                {
                  "textRaw": "filehandle.chmod(mode)",
                  "type": "method",
                  "name": "chmod",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "textRaw": "`mode` {integer} ",
                          "name": "mode",
                          "type": "integer"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "mode"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Modifies the permissions on the file. The <code>Promise</code> is resolved with no\narguments upon success.</p>\n"
                },
                {
                  "textRaw": "filehandle.chown(uid, gid)",
                  "type": "method",
                  "name": "chown",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "textRaw": "`uid` {integer} ",
                          "name": "uid",
                          "type": "integer"
                        },
                        {
                          "textRaw": "`gid` {integer} ",
                          "name": "gid",
                          "type": "integer"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "uid"
                        },
                        {
                          "name": "gid"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Changes the ownership of the file then resolves the <code>Promise</code> with no arguments\nupon success.</p>\n"
                },
                {
                  "textRaw": "filehandle.close()",
                  "type": "method",
                  "name": "close",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} A `Promise` that will be resolved once the underlying file descriptor is closed, or will be rejected if an error occurs while closing. ",
                        "name": "return",
                        "type": "Promise",
                        "desc": "A `Promise` that will be resolved once the underlying file descriptor is closed, or will be rejected if an error occurs while closing."
                      },
                      "params": []
                    },
                    {
                      "params": []
                    }
                  ],
                  "desc": "<p>Closes the file descriptor.</p>\n<pre><code class=\"lang-js\">async function openAndClose() {\n  let filehandle;\n  try {\n    filehandle = await fsPromises.open(&#39;thefile.txt&#39;, &#39;r&#39;);\n  } finally {\n    if (filehandle !== undefined)\n      await filehandle.close();\n  }\n}\n</code></pre>\n"
                },
                {
                  "textRaw": "filehandle.datasync()",
                  "type": "method",
                  "name": "datasync",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": []
                    },
                    {
                      "params": []
                    }
                  ],
                  "desc": "<p>Asynchronous fdatasync(2). The <code>Promise</code> is resolved with no arguments upon\nsuccess.</p>\n"
                },
                {
                  "textRaw": "filehandle.read(buffer, offset, length, position)",
                  "type": "method",
                  "name": "read",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "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"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "buffer"
                        },
                        {
                          "name": "offset"
                        },
                        {
                          "name": "length"
                        },
                        {
                          "name": "position"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Read data from the file.</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 argument 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,\nand the file position will be updated.\nIf <code>position</code> is an integer, the file position will remain unchanged.</p>\n<p>Following successful read, the <code>Promise</code> is resolved with an object with a\n<code>bytesRead</code> property specifying the number of bytes read, and a <code>buffer</code>\nproperty that is a reference to the passed in <code>buffer</code> argument.</p>\n"
                },
                {
                  "textRaw": "filehandle.readFile(options)",
                  "type": "method",
                  "name": "readFile",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "textRaw": "`options` {Object|string} ",
                          "options": [
                            {
                              "textRaw": "`encoding` {string|null} **Default:** `null` ",
                              "name": "encoding",
                              "type": "string|null",
                              "default": "`null`"
                            },
                            {
                              "textRaw": "`flag` {string} **Default:** `'r'` ",
                              "name": "flag",
                              "type": "string",
                              "default": "`'r'`"
                            }
                          ],
                          "name": "options",
                          "type": "Object|string"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "options"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Asynchronously reads the entire contents of a file.</p>\n<p>The <code>Promise</code> is resolved with the contents of the file. If no encoding is\nspecified (using <code>options.encoding</code>), the data is returned as a <code>Buffer</code>\nobject. Otherwise, the data will be a string.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n<p>When the <code>path</code> is a directory, the behavior of <code>fsPromises.readFile()</code> is\nplatform-specific. On macOS, Linux, and Windows, the promise will be rejected\nwith an error. On FreeBSD, a representation of the directory&#39;s contents will be\nreturned.</p>\n<p>The <code>FileHandle</code> has to support reading.</p>\n"
                },
                {
                  "textRaw": "filehandle.stat()",
                  "type": "method",
                  "name": "stat",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": []
                    },
                    {
                      "params": []
                    }
                  ],
                  "desc": "<p>Retrieves the <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> for the file.</p>\n"
                },
                {
                  "textRaw": "filehandle.sync()",
                  "type": "method",
                  "name": "sync",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": []
                    },
                    {
                      "params": []
                    }
                  ],
                  "desc": "<p>Asynchronous fsync(2). The <code>Promise</code> is resolved with no arguments upon\nsuccess.</p>\n"
                },
                {
                  "textRaw": "filehandle.truncate(len)",
                  "type": "method",
                  "name": "truncate",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "textRaw": "`len` {integer} **Default:** `0` ",
                          "name": "len",
                          "type": "integer",
                          "default": "`0`"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "len"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Truncates the file then resolves the <code>Promise</code> with no arguments upon success.</p>\n<p>If the file was larger than <code>len</code> bytes, only the first <code>len</code> bytes will be\nretained in the file.</p>\n<p>For example, the following program retains only the first four bytes of the\nfile:</p>\n<pre><code class=\"lang-js\">console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));\n// Prints: Node.js\n\nasync function doTruncate() {\n  const fd = await fsPromises.open(&#39;temp.txt&#39;, &#39;r+&#39;);\n  await fsPromises.ftruncate(fd, 4);\n  console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));  // Prints: Node\n}\n\ndoTruncate().catch(console.error);\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;utf8&#39;));\n// Prints: Node.js\n\nasync function doTruncate() {\n  const fd = await fsPromises.open(&#39;temp.txt&#39;, &#39;r+&#39;);\n  await fsPromises.ftruncate(fd, 10);\n  console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));  // Prints Node.js\\0\\0\\0\n}\n\ndoTruncate().catch(console.error);\n</code></pre>\n<p>The last three bytes are null bytes (&#39;\\0&#39;), to compensate the over-truncation.</p>\n"
                },
                {
                  "textRaw": "filehandle.utimes(atime, mtime)",
                  "type": "method",
                  "name": "utimes",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "textRaw": "`atime` {number|string|Date} ",
                          "name": "atime",
                          "type": "number|string|Date"
                        },
                        {
                          "textRaw": "`mtime` {number|string|Date}` ",
                          "name": "mtime",
                          "type": "number|string|Date",
                          "desc": "`"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "atime"
                        },
                        {
                          "name": "mtime"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Change the file system timestamps of the object referenced by the <code>FileHandle</code>\nthen resolves the <code>Promise</code> with no arguments upon success.</p>\n<p>This function does not work on AIX versions before 7.1, it will resolve the\n<code>Promise</code> with an error using code <code>UV_ENOSYS</code>.</p>\n"
                },
                {
                  "textRaw": "filehandle.write(buffer, offset, length, position)",
                  "type": "method",
                  "name": "write",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "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"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "buffer"
                        },
                        {
                          "name": "offset"
                        },
                        {
                          "name": "length"
                        },
                        {
                          "name": "position"
                        }
                      ]
                    }
                  ],
                  "desc": "<p>Write <code>buffer</code> to the file.</p>\n<p>The <code>Promise</code> is resolved with an object containing a <code>bytesWritten</code> property\nidentifying the number of bytes written, and a <code>buffer</code> property containing\na reference to the <code>buffer</code> written.</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>It is unsafe to use <code>filehandle.write()</code> multiple times on the same file\nwithout waiting for the <code>Promise</code> to be resolved (or rejected). For this\nscenario, <code>fs.createWriteStream</code> is strongly recommended.</p>\n<p>On Linux, positional writes do not 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": "filehandle.writeFile(data, options)",
                  "type": "method",
                  "name": "writeFile",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "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",
                              "default": "`'utf8'`"
                            },
                            {
                              "textRaw": "`mode` {integer} **Default:** `0o666` ",
                              "name": "mode",
                              "type": "integer",
                              "default": "`0o666`"
                            },
                            {
                              "textRaw": "`flag` {string} **Default:** `'w'` ",
                              "name": "flag",
                              "type": "string",
                              "default": "`'w'`"
                            }
                          ],
                          "name": "options",
                          "type": "Object|string"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "data"
                        },
                        {
                          "name": "options"
                        }
                      ]
                    }
                  ],
                  "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. The <code>Promise</code> will be resolved with no\narguments upon success.</p>\n<p>The <code>encoding</code> option is ignored if <code>data</code> is a buffer.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n<p>The <code>FileHandle</code> has to support writing.</p>\n<p>It is unsafe to use <code>filehandle.writeFile()</code> multiple times on the same file\nwithout waiting for the <code>Promise</code> to be resolved (or rejected).</p>\n"
                }
              ],
              "properties": [
                {
                  "textRaw": "`fd` {number} The numeric file descriptor managed by the `FileHandle` object. ",
                  "type": "number",
                  "name": "fd",
                  "meta": {
                    "added": [
                      "REPLACEME"
                    ],
                    "changes": []
                  },
                  "desc": "The numeric file descriptor managed by the `FileHandle` object.",
                  "signatures": [
                    {
                      "return": {
                        "textRaw": "Returns: {Promise} ",
                        "name": "return",
                        "type": "Promise"
                      },
                      "params": [
                        {
                          "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"
                        }
                      ]
                    },
                    {
                      "params": [
                        {
                          "name": "buffer"
                        },
                        {
                          "name": "offset"
                        },
                        {
                          "name": "length"
                        },
                        {
                          "name": "position"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "methods": [
            {
              "textRaw": "fsPromises.access(path[, mode])",
              "type": "method",
              "name": "access",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `fs.constants.F_OK` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`fs.constants.F_OK`",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "mode",
                      "optional": true
                    }
                  ]
                }
              ],
              "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 (e.g. <code>fs.constants.W_OK | fs.constants.R_OK</code>).</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>If the accessibility check is successful, the <code>Promise</code> is resolved with no\nvalue. If any of the accessibility checks fail, the <code>Promise</code> is rejected\nwith an <code>Error</code> object. 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\">fsPromises.access(&#39;/etc/passwd&#39;, fs.constants.R_OK | fs.constants.W_OK)\n  .then(() =&gt; console.log(&#39;can access&#39;))\n  .catch(() =&gt; console.error(&#39;cannot access&#39;));\n</code></pre>\n<p>Using <code>fsPromises.access()</code> to check for the accessibility of a file before\ncalling <code>fsPromises.open()</code> is not recommended. Doing so introduces a race\ncondition, since other processes may change the file&#39;s state between the two\ncalls. Instead, user code should open/read/write the file directly and handle\nthe error raised if the file is not accessible.</p>\n"
            },
            {
              "textRaw": "fsPromises.appendFile(file, data[, options])",
              "type": "method",
              "name": "appendFile",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`file` {string|Buffer|URL|FileHandle} filename or `FileHandle` ",
                      "name": "file",
                      "type": "string|Buffer|URL|FileHandle",
                      "desc": "filename or `FileHandle`"
                    },
                    {
                      "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",
                          "default": "`'utf8'`"
                        },
                        {
                          "textRaw": "`mode` {integer} **Default:** `0o666` ",
                          "name": "mode",
                          "type": "integer",
                          "default": "`0o666`"
                        },
                        {
                          "textRaw": "`flag` {string} **Default:** `'a'` ",
                          "name": "flag",
                          "type": "string",
                          "default": "`'a'`"
                        }
                      ],
                      "name": "options",
                      "type": "Object|string",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "file"
                    },
                    {
                      "name": "data"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronously append data to a file, creating the file if it does not yet\nexist. <code>data</code> can be a string or a <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>. The <code>Promise</code> will be\nresolved with no arguments upon success.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n<p>The <code>file</code> may be specified as a <code>FileHandle</code> that has been opened\nfor appending (using <code>fsPromises.open()</code>).</p>\n"
            },
            {
              "textRaw": "fsPromises.chmod(path, mode)",
              "type": "method",
              "name": "chmod",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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>Changes the permissions of a file then resolves the <code>Promise</code> with no\narguments upon succces.</p>\n"
            },
            {
              "textRaw": "fsPromises.chown(path, uid, gid)",
              "type": "method",
              "name": "chown",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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>Changes the ownership of a file then resolves the <code>Promise</code> with no arguments\nupon success.</p>\n"
            },
            {
              "textRaw": "fsPromises.copyFile(src, dest[, flags])",
              "type": "method",
              "name": "copyFile",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`src` {string|Buffer|URL} source filename to copy ",
                      "name": "src",
                      "type": "string|Buffer|URL",
                      "desc": "source filename to copy"
                    },
                    {
                      "textRaw": "`dest` {string|Buffer|URL} destination filename of the copy operation ",
                      "name": "dest",
                      "type": "string|Buffer|URL",
                      "desc": "destination filename of the copy operation"
                    },
                    {
                      "textRaw": "`flags` {number} modifiers for copy operation. **Default:** `0`. ",
                      "name": "flags",
                      "type": "number",
                      "default": "`0`",
                      "desc": "modifiers for copy operation.",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "src"
                    },
                    {
                      "name": "dest"
                    },
                    {
                      "name": "flags",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronously copies <code>src</code> to <code>dest</code>. By default, <code>dest</code> is overwritten if it\nalready exists. The <code>Promise</code> will be resolved with no arguments upon success.</p>\n<p>Node.js makes no guarantees about the atomicity of the copy operation. If an\nerror occurs after the destination file has been opened for writing, Node.js\nwill attempt to remove the destination.</p>\n<p><code>flags</code> is an optional integer that specifies the behavior\nof the copy operation. It is possible to create a mask consisting of the bitwise\nOR of two or more values (e.g.\n<code>fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE</code>).</p>\n<ul>\n<li><code>fs.constants.COPYFILE_EXCL</code> - The copy operation will fail if <code>dest</code> already\nexists.</li>\n<li><code>fs.constants.COPYFILE_FICLONE</code> - The copy operation will attempt to create a\ncopy-on-write reflink. If the platform does not support copy-on-write, then a\nfallback copy mechanism is used.</li>\n<li><code>fs.constants.COPYFILE_FICLONE_FORCE</code> - The copy operation will attempt to\ncreate a copy-on-write reflink. If the platform does not support copy-on-write,\nthen the operation will fail.</li>\n</ul>\n<p>Example:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\n// destination.txt will be created or overwritten by default.\nfsPromises.copyFile(&#39;source.txt&#39;, &#39;destination.txt&#39;)\n  .then(() =&gt; console.log(&#39;source.txt was copied to destination.txt&#39;))\n  .catch(() =&gt; console.log(&#39;The file could not be copied&#39;));\n</code></pre>\n<p>If the third argument is a number, then it specifies <code>flags</code>, as shown in the\nfollowing example.</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\nconst { COPYFILE_EXCL } = fs.constants;\n\n// By using COPYFILE_EXCL, the operation will fail if destination.txt exists.\nfsPromises.copyFile(&#39;source.txt&#39;, &#39;destination.txt&#39;, COPYFILE_EXCL)\n  .then(() =&gt; console.log(&#39;source.txt was copied to destination.txt&#39;))\n  .catch(() =&gt; console.log(&#39;The file could not be copied&#39;));\n</code></pre>\n"
            },
            {
              "textRaw": "fsPromises.fchmod(filehandle, mode)",
              "type": "method",
              "name": "fchmod",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    },
                    {
                      "textRaw": "`mode` {integer} ",
                      "name": "mode",
                      "type": "integer"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    },
                    {
                      "name": "mode"
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous fchmod(2). The <code>Promise</code> is resolved with no arguments upon\nsuccess.</p>\n"
            },
            {
              "textRaw": "fsPromises.fchown(filehandle, uid, gid)",
              "type": "method",
              "name": "fchown",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    },
                    {
                      "textRaw": "`uid` {integer} ",
                      "name": "uid",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`gid` {integer} ",
                      "name": "gid",
                      "type": "integer"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    },
                    {
                      "name": "uid"
                    },
                    {
                      "name": "gid"
                    }
                  ]
                }
              ],
              "desc": "<p>Changes the ownership of the file represented by <code>filehandle</code> then resolves\nthe <code>Promise</code> with no arguments upon success.</p>\n"
            },
            {
              "textRaw": "fsPromises.fdatasync(filehandle)",
              "type": "method",
              "name": "fdatasync",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous fdatasync(2). The <code>Promise</code> is resolved with no arguments upon\nsuccess.</p>\n"
            },
            {
              "textRaw": "fsPromises.fstat(filehandle)",
              "type": "method",
              "name": "fstat",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    }
                  ]
                }
              ],
              "desc": "<p>Retrieves the <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> for the given <code>filehandle</code>.</p>\n"
            },
            {
              "textRaw": "fsPromises.fsync(filehandle)",
              "type": "method",
              "name": "fsync",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous fsync(2). The <code>Promise</code> is resolved with no arguments upon\nsuccess.</p>\n"
            },
            {
              "textRaw": "fsPromises.ftruncate(filehandle[, len])",
              "type": "method",
              "name": "ftruncate",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    },
                    {
                      "textRaw": "`len` {integer} **Default:** `0` ",
                      "name": "len",
                      "type": "integer",
                      "default": "`0`",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    },
                    {
                      "name": "len",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Truncates the file represented by <code>filehandle</code> then resolves the <code>Promise</code>\nwith no arguments upon success.</p>\n<p>If the file referred to by the <code>FileHandle</code> 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\nfile:</p>\n<pre><code class=\"lang-js\">console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));\n// Prints: Node.js\n\nasync function doTruncate() {\n  const fd = await fsPromises.open(&#39;temp.txt&#39;, &#39;r+&#39;);\n  await fsPromises.ftruncate(fd, 4);\n  console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));  // Prints: Node\n}\n\ndoTruncate().catch(console.error);\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;utf8&#39;));\n// Prints: Node.js\n\nasync function doTruncate() {\n  const fd = await fsPromises.open(&#39;temp.txt&#39;, &#39;r+&#39;);\n  await fsPromises.ftruncate(fd, 10);\n  console.log(fs.readFileSync(&#39;temp.txt&#39;, &#39;utf8&#39;));  // Prints Node.js\\0\\0\\0\n}\n\ndoTruncate().catch(console.error);\n</code></pre>\n<p>The last three bytes are null bytes (&#39;\\0&#39;), to compensate the over-truncation.</p>\n"
            },
            {
              "textRaw": "fsPromises.futimes(filehandle, atime, mtime)",
              "type": "method",
              "name": "futimes",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    },
                    {
                      "textRaw": "`atime` {number|string|Date} ",
                      "name": "atime",
                      "type": "number|string|Date"
                    },
                    {
                      "textRaw": "`mtime` {number|string|Date}` ",
                      "name": "mtime",
                      "type": "number|string|Date",
                      "desc": "`"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    },
                    {
                      "name": "atime"
                    },
                    {
                      "name": "mtime"
                    }
                  ]
                }
              ],
              "desc": "<p>Change the file system timestamps of the object referenced by the supplied\n<code>FileHandle</code> then resolves the <code>Promise</code> with no arguments upon success.</p>\n<p>This function does not work on AIX versions before 7.1, it will resolve the\n<code>Promise</code> with an error using code <code>UV_ENOSYS</code>.</p>\n"
            },
            {
              "textRaw": "fsPromises.lchmod(path, mode)",
              "type": "method",
              "name": "lchmod",
              "meta": {
                "deprecated": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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>Changes the permissions on a symbolic link then resolves the <code>Promise</code> with\nno arguments upon success. This method is only implemented on macOS.</p>\n"
            },
            {
              "textRaw": "fsPromises.lchown(path, uid, gid)",
              "type": "method",
              "name": "lchown",
              "meta": {
                "deprecated": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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>Changes the ownership on a symbolic link then resolves the <code>Promise</code> with\nno arguments upon success. This method is only implemented on macOS.</p>\n"
            },
            {
              "textRaw": "fsPromises.link(existingPath, newPath)",
              "type": "method",
              "name": "link",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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>Asynchronous link(2). The <code>Promise</code> is resolved with no arguments upon success.</p>\n"
            },
            {
              "textRaw": "fsPromises.lstat(path)",
              "type": "method",
              "name": "lstat",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous lstat(2). The <code>Promise</code> is resolved with the <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object\nfor the given symbolic link <code>path</code>.</p>\n"
            },
            {
              "textRaw": "fsPromises.mkdir(path[, mode])",
              "type": "method",
              "name": "mkdir",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o777` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o777`",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "mode",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronously creates a directory then resolves the <code>Promise</code> with no\narguments upon success.</p>\n"
            },
            {
              "textRaw": "fsPromises.mkdtemp(prefix[, options])",
              "type": "method",
              "name": "mkdtemp",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`prefix` {string} ",
                      "name": "prefix",
                      "type": "string"
                    },
                    {
                      "textRaw": "`options` {string|Object} ",
                      "options": [
                        {
                          "textRaw": "`encoding` {string} **Default:** `'utf8'` ",
                          "name": "encoding",
                          "type": "string",
                          "default": "`'utf8'`"
                        }
                      ],
                      "name": "options",
                      "type": "string|Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "prefix"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Creates a unique temporary directory then resolves the <code>Promise</code> with the\ncreated folder path. A unique directory name is generated by appending six\nrandom characters to the end of the provided <code>prefix</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.</p>\n<p>Example:</p>\n<pre><code class=\"lang-js\">fsPromises.mkdtemp(path.join(os.tmpdir(), &#39;foo-&#39;))\n  .catch(console.error);\n</code></pre>\n<p>The <code>fs.mkdtemp()</code> method will append the six randomly selected characters\ndirectly to the <code>prefix</code> string. For instance, given a directory <code>/tmp</code>, if the\nintention is to create a temporary directory <em>within</em> <code>/tmp</code>, the <code>prefix</code>\n<em>must</em> end with a trailing platform-specific path separator\n(<code>require(&#39;path&#39;).sep</code>).</p>\n"
            },
            {
              "textRaw": "fsPromises.open(path, flags[, mode])",
              "type": "method",
              "name": "open",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    },
                    {
                      "textRaw": "`flags` {string|number} ",
                      "name": "flags",
                      "type": "string|number"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` (readable and writable) ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666` (readable and writable)",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "flags"
                    },
                    {
                      "name": "mode",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous file open that returns a <code>Promise</code> that, when resolved, yields a\n<code>FileHandle</code> object. See open(2).</p>\n<p>The <code>flags</code> argument 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 does not turn <code>fsPromises.open()</code> into a synchronous blocking\ncall.</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;as&#39;</code> - Open file for appending in synchronous mode.\nThe file is created if it does not exist.</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<li><p><code>&#39;as+&#39;</code> - Open file for reading and appending in synchronous mode.\nThe file is created if it does not exist.</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.</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>The behavior of <code>fsPromises.open()</code> is platform-specific for some\nflags. As such, opening a directory on macOS and Linux with the <code>&#39;a+&#39;</code> flag will\nreturn an error. In contrast, on Windows and FreeBSD, a <code>FileHandle</code> will be\nreturned.</p>\n<p>Some characters (<code>&lt; &gt; : &quot; / \\ | ? *</code>) are reserved under Windows as documented\nby <a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx\">Naming Files, Paths, and Namespaces</a>. Under NTFS, if the filename contains\na colon, Node.js will open a file system stream, as described by\n<a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx\">this MSDN page</a>.</p>\n<p><em>Note:</em> On Windows, opening an existing hidden file using the <code>w</code> flag (e.g.\nusing <code>fsPromises.open()</code>) will fail with <code>EPERM</code>. Existing hidden\nfiles can be opened for writing with the <code>r+</code> flag. A call to\n<code>fsPromises.ftruncate()</code> can be used to reset the file contents.</p>\n"
            },
            {
              "textRaw": "fsPromises.read(filehandle, buffer, offset, length, position)",
              "type": "method",
              "name": "read",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    },
                    {
                      "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"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "filehandle"
                    },
                    {
                      "name": "buffer"
                    },
                    {
                      "name": "offset"
                    },
                    {
                      "name": "length"
                    },
                    {
                      "name": "position"
                    }
                  ]
                }
              ],
              "desc": "<p>Read data from the file specified by <code>filehandle</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 argument 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,\nand the file position will be updated.\nIf <code>position</code> is an integer, the file position will remain unchanged.</p>\n<p>Following successful read, the <code>Promise</code> is resolved with an object with a\n<code>bytesRead</code> property specifying the number of bytes read, and a <code>buffer</code>\nproperty that is a reference to the passed in <code>buffer</code> argument.</p>\n"
            },
            {
              "textRaw": "fsPromises.readdir(path[, options])",
              "type": "method",
              "name": "readdir",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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",
                          "default": "`'utf8'`"
                        }
                      ],
                      "name": "options",
                      "type": "string|Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Reads the contents of a directory then resolves the <code>Promise</code> with an array\nof the names of the files in the directory excludiing <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. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the filenames returned\nwill be passed as <code>Buffer</code> objects.</p>\n"
            },
            {
              "textRaw": "fsPromises.readFile(path[, options])",
              "type": "method",
              "name": "readFile",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL|FileHandle} filename or `FileHandle` ",
                      "name": "path",
                      "type": "string|Buffer|URL|FileHandle",
                      "desc": "filename or `FileHandle`"
                    },
                    {
                      "textRaw": "`options` {Object|string} ",
                      "options": [
                        {
                          "textRaw": "`encoding` {string|null} **Default:** `null` ",
                          "name": "encoding",
                          "type": "string|null",
                          "default": "`null`"
                        },
                        {
                          "textRaw": "`flag` {string} **Default:** `'r'` ",
                          "name": "flag",
                          "type": "string",
                          "default": "`'r'`"
                        }
                      ],
                      "name": "options",
                      "type": "Object|string",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronously reads the entire contents of a file.</p>\n<p>The <code>Promise</code> is resolved with the contents of the file. If no encoding is\nspecified (using <code>options.encoding</code>), the data is returned as a <code>Buffer</code>\nobject. Otherwise, the data will be a string.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n<p>When the <code>path</code> is a directory, the behavior of <code>fsPromises.readFile()</code> is\nplatform-specific. On macOS, Linux, and Windows, the promise will be rejected\nwith an error. On FreeBSD, a representation of the directory&#39;s contents will be\nreturned.</p>\n<p>Any specified <code>FileHandle</code> has to support reading.</p>\n"
            },
            {
              "textRaw": "fsPromises.readlink(path[, options])",
              "type": "method",
              "name": "readlink",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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",
                          "default": "`'utf8'`"
                        }
                      ],
                      "name": "options",
                      "type": "string|Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous readlink(2). The <code>Promise</code> is resolved with the <code>linkString</code> upon\nsuccess.</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 returned. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the link path\nreturned will be passed as a <code>Buffer</code> object.</p>\n"
            },
            {
              "textRaw": "fsPromises.realpath(path[, options])",
              "type": "method",
              "name": "realpath",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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",
                          "default": "`'utf8'`"
                        }
                      ],
                      "name": "options",
                      "type": "string|Object",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Determines the actual location of <code>path</code> using the same semantics as the\n<code>fs.realpath.native()</code> function then resolves the <code>Promise</code> with the resolved\npath.</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. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the path returned will be\npassed as a <code>Buffer</code> object.</p>\n<p>On Linux, when Node.js is linked against musl libc, the procfs file system must\nbe mounted on <code>/proc</code> in order for this function to work. Glibc does not have\nthis restriction.</p>\n"
            },
            {
              "textRaw": "fsPromises.rename(oldPath, newPath)",
              "type": "method",
              "name": "rename",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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>Renames <code>oldPath</code> to <code>newPath</code> and resolves the <code>Promise</code> with no arguments\nupon success.</p>\n"
            },
            {
              "textRaw": "fsPromises.rmdir(path)",
              "type": "method",
              "name": "rmdir",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    }
                  ]
                }
              ],
              "desc": "<p>Removes the directory identified by <code>path</code> then resolves the <code>Promise</code> with\nno arguments upon success.</p>\n<p>Using <code>fsPromises.rmdir()</code> on a file (not a directory) results in the\n<code>Promise</code> being rejected with an <code>ENOENT</code> error on Windows and an <code>ENOTDIR</code>\nerror on POSIX.</p>\n"
            },
            {
              "textRaw": "fsPromises.stat(path)",
              "type": "method",
              "name": "stat",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    }
                  ]
                }
              ],
              "desc": "<p>The <code>Promise</code> is resolved with the <a href=\"#fs_class_fs_stats\"><code>fs.Stats</code></a> object for the given <code>path</code>.</p>\n"
            },
            {
              "textRaw": "fsPromises.symlink(target, path[, type])",
              "type": "method",
              "name": "symlink",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "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} **Default:** `'file'` ",
                      "name": "type",
                      "type": "string",
                      "default": "`'file'`",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "target"
                    },
                    {
                      "name": "path"
                    },
                    {
                      "name": "type",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Creates a symbolic link then resolves the <code>Promise</code> with no arguments upon\nsuccess.</p>\n<p>The <code>type</code> argument is only used on Windows platforms and can be one of <code>&#39;dir&#39;</code>,\n<code>&#39;file&#39;</code>, or <code>&#39;junction&#39;</code>. Note that Windows junction\npoints require the destination path to be absolute. When using <code>&#39;junction&#39;</code>,\nthe <code>target</code> argument will automatically be normalized to absolute path.</p>\n"
            },
            {
              "textRaw": "fsPromises.truncate(path[, len])",
              "type": "method",
              "name": "truncate",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    },
                    {
                      "textRaw": "`len` {integer} **Default:** `0` ",
                      "name": "len",
                      "type": "integer",
                      "default": "`0`",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "len",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Truncates the <code>path</code> then resolves the <code>Promise</code> with no arguments upon\nsuccess. The <code>path</code> <em>must</em> be a string or <code>Buffer</code>.</p>\n"
            },
            {
              "textRaw": "fsPromises.unlink(path)",
              "type": "method",
              "name": "unlink",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    }
                  ]
                }
              ],
              "desc": "<p>Asynchronous unlink(2). The <code>Promise</code> is resolved with no arguments upon\nsuccess.</p>\n"
            },
            {
              "textRaw": "fsPromises.utimes(path, atime, mtime)",
              "type": "method",
              "name": "utimes",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`path` {string|Buffer|URL} ",
                      "name": "path",
                      "type": "string|Buffer|URL"
                    },
                    {
                      "textRaw": "`atime` {number|string|Date} ",
                      "name": "atime",
                      "type": "number|string|Date"
                    },
                    {
                      "textRaw": "`mtime` {number|string|Date} ",
                      "name": "mtime",
                      "type": "number|string|Date"
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "path"
                    },
                    {
                      "name": "atime"
                    },
                    {
                      "name": "mtime"
                    }
                  ]
                }
              ],
              "desc": "<p>Change the file system timestamps of the object referenced by <code>path</code> then\nresolves the <code>Promise</code> with no arguments upon success.</p>\n<p>The <code>atime</code> and <code>mtime</code> arguments follow these rules:</p>\n<ul>\n<li>Values can be either numbers representing Unix epoch time, <code>Date</code>s, or a\nnumeric string like <code>&#39;123456789.0&#39;</code>.</li>\n<li>If the value can not be converted to a number, or is <code>NaN</code>, <code>Infinity</code> or\n<code>-Infinity</code>, an <code>Error</code> will be thrown.</li>\n</ul>\n"
            },
            {
              "textRaw": "fsPromises.write(filehandle, buffer[, offset[, length[, position]]])",
              "type": "method",
              "name": "write",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`filehandle` {FileHandle} ",
                      "name": "filehandle",
                      "type": "FileHandle"
                    },
                    {
                      "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": "filehandle"
                    },
                    {
                      "name": "buffer"
                    },
                    {
                      "name": "offset",
                      "optional": true
                    },
                    {
                      "name": "length",
                      "optional": true
                    },
                    {
                      "name": "position",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Write <code>buffer</code> to the file specified by <code>filehandle</code>.</p>\n<p>The <code>Promise</code> is resolved with an object containing a <code>bytesWritten</code> property\nidentifying the number of bytes written, and a <code>buffer</code> property containing\na reference to the <code>buffer</code> written.</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>It is unsafe to use <code>fsPromises.write()</code> multiple times on the same file\nwithout waiting for the <code>Promise</code> to be resolved (or rejected). For this\nscenario, <code>fs.createWriteStream</code> is strongly recommended.</p>\n<p>On Linux, positional writes do not 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": "fsPromises.writeFile(file, data[, options])",
              "type": "method",
              "name": "writeFile",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {Promise} ",
                    "name": "return",
                    "type": "Promise"
                  },
                  "params": [
                    {
                      "textRaw": "`file` {string|Buffer|URL|FileHandle} filename or `FileHandle` ",
                      "name": "file",
                      "type": "string|Buffer|URL|FileHandle",
                      "desc": "filename or `FileHandle`"
                    },
                    {
                      "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",
                          "default": "`'utf8'`"
                        },
                        {
                          "textRaw": "`mode` {integer} **Default:** `0o666` ",
                          "name": "mode",
                          "type": "integer",
                          "default": "`0o666`"
                        },
                        {
                          "textRaw": "`flag` {string} **Default:** `'w'` ",
                          "name": "flag",
                          "type": "string",
                          "default": "`'w'`"
                        }
                      ],
                      "name": "options",
                      "type": "Object|string",
                      "optional": true
                    }
                  ]
                },
                {
                  "params": [
                    {
                      "name": "file"
                    },
                    {
                      "name": "data"
                    },
                    {
                      "name": "options",
                      "optional": true
                    }
                  ]
                }
              ],
              "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. The <code>Promise</code> will be resolved with no\narguments upon success.</p>\n<p>The <code>encoding</code> option is ignored if <code>data</code> is a buffer.</p>\n<p>If <code>options</code> is a string, then it specifies the encoding.</p>\n<p>Any specified <code>FileHandle</code> has to support writing.</p>\n<p>It is unsafe to use <code>fsPromises.writeFile()</code> multiple times on the same file\nwithout waiting for the <code>Promise</code> to be resolved (or rejected).</p>\n"
            }
          ],
          "type": "module",
          "displayName": "fs Promises API"
        },
        {
          "textRaw": "FS Constants",
          "name": "fs_constants",
          "desc": "<p>The following constants are exported by <code>fs.constants</code>.</p>\n<p>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 Copy Constants",
              "name": "file_copy_constants",
              "desc": "<p>The following constants are meant for use with <a href=\"#fs_fs_copyfile_src_dest_flags_callback\"><code>fs.copyFile()</code></a>.</p>\n<table>\n  <tr>\n    <th>Constant</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td><code>COPYFILE_EXCL</code></td>\n    <td>If present, the copy operation will fail with an error if the\n    destination path already exists.</td>\n  </tr>\n  <tr>\n    <td><code>COPYFILE_FICLONE</code></td>\n    <td>If present, the copy operation will attempt to create a\n    copy-on-write reflink. If the underlying platform does not support\n    copy-on-write, then a fallback copy mechanism is used.</td>\n  </tr>\n  <tr>\n    <td><code>COPYFILE_FICLONE_FORCE</code></td>\n    <td>If present, the copy operation will attempt to create a\n    copy-on-write reflink. If the underlying platform does not support\n    copy-on-write, then the operation will fail with an error.</td>\n  </tr>\n</table>\n\n",
              "type": "module",
              "displayName": "File Copy 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 synchronized I/O with write\n    operations waiting for file integrity.</td>\n  </tr>\n  <tr>\n    <td><code>O_DSYNC</code></td>\n    <td>Flag indicating that the file is opened for synchronized I/O with write\n    operations waiting for data integrity.</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>A successful call to <a href=\"#fs_fs_watch_filename_options_listener\"><code>fs.watch()</code></a> method will return a new <code>fs.FSWatcher</code>\nobject.</p>\n<p>All <code>fs.FSWatcher</code> objects are <a href=\"events.html\"><code>EventEmitter</code></a>&#39;s that will emit a <code>&#39;change&#39;</code>\nevent whenever a specific watched file is modified.</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 UTF-8 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});\n</code></pre>\n"
            },
            {
              "textRaw": "Event: 'close'",
              "type": "event",
              "name": "close",
              "meta": {
                "added": [
                  "REPLACEME"
                ],
                "changes": []
              },
              "desc": "<p>Emitted when the watcher stops watching for changes.</p>\n",
              "params": []
            },
            {
              "textRaw": "Event: 'error'",
              "type": "event",
              "name": "error",
              "meta": {
                "added": [
                  "v0.5.8"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when an error occurs while watching the file.</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>. Once stopped, the\n<code>fs.FSWatcher</code> object is no longer usable.</p>\n",
              "signatures": [
                {
                  "params": []
                }
              ]
            }
          ]
        },
        {
          "textRaw": "Class: fs.ReadStream",
          "type": "class",
          "name": "fs.ReadStream",
          "meta": {
            "added": [
              "v0.1.93"
            ],
            "changes": []
          },
          "desc": "<p>A successful call to <code>fs.createReadStream()</code> will return a new <code>fs.ReadStream</code>\nobject.</p>\n<p>All <code>fs.ReadStream</code> objects are <a href=\"stream.html#stream_class_stream_readable\">Readable Streams</a>.</p>\n",
          "events": [
            {
              "textRaw": "Event: 'close'",
              "type": "event",
              "name": "close",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "desc": "<p>Emitted when the <code>fs.ReadStream</code>&#39;s underlying file descriptor has been closed.</p>\n",
              "params": []
            },
            {
              "textRaw": "Event: 'open'",
              "type": "event",
              "name": "open",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when the <code>fs.ReadStream</code>&#39;s file descriptor has been opened.</p>\n"
            },
            {
              "textRaw": "Event: 'ready'",
              "type": "event",
              "name": "ready",
              "meta": {
                "added": [
                  "v9.11.0"
                ],
                "changes": []
              },
              "desc": "<p>Emitted when the <code>fs.ReadStream</code> is ready to be used.</p>\n<p>Fires immediately after <code>&#39;open&#39;</code>.</p>\n",
              "params": []
            }
          ],
          "properties": [
            {
              "textRaw": "`bytesRead` {number} ",
              "type": "number",
              "name": "bytesRead",
              "meta": {
                "added": [
                  "v6.4.0"
                ],
                "changes": []
              },
              "desc": "<p>The number of bytes that have been read so far.</p>\n"
            },
            {
              "textRaw": "`path` {string|Buffer} ",
              "type": "string|Buffer",
              "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>A <code>fs.Stats</code> object provides information about a file.</p>\n<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<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",
          "methods": [
            {
              "textRaw": "stats.isBlockDevice()",
              "type": "method",
              "name": "isBlockDevice",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a block device.</p>\n"
            },
            {
              "textRaw": "stats.isCharacterDevice()",
              "type": "method",
              "name": "isCharacterDevice",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a character device.</p>\n"
            },
            {
              "textRaw": "stats.isDirectory()",
              "type": "method",
              "name": "isDirectory",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a file system directory.</p>\n"
            },
            {
              "textRaw": "stats.isFIFO()",
              "type": "method",
              "name": "isFIFO",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a first-in-first-out (FIFO)\npipe.</p>\n"
            },
            {
              "textRaw": "stats.isFile()",
              "type": "method",
              "name": "isFile",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a regular file.</p>\n"
            },
            {
              "textRaw": "stats.isSocket()",
              "type": "method",
              "name": "isSocket",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a socket.</p>\n"
            },
            {
              "textRaw": "stats.isSymbolicLink()",
              "type": "method",
              "name": "isSymbolicLink",
              "meta": {
                "added": [
                  "v0.1.10"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "return": {
                    "textRaw": "Returns: {boolean} ",
                    "name": "return",
                    "type": "boolean"
                  },
                  "params": []
                },
                {
                  "params": []
                }
              ],
              "desc": "<p>Returns <code>true</code> if the <code>fs.Stats</code> object describes a symbolic link.</p>\n<p>This method is only valid when using <a href=\"#fs_fs_lstat_path_callback\"><code>fs.lstat()</code></a></p>\n"
            }
          ],
          "properties": [
            {
              "textRaw": "`dev` {number} ",
              "type": "number",
              "name": "dev",
              "desc": "<p>The numeric identifier of the device containing the file.</p>\n"
            },
            {
              "textRaw": "`ino` {number} ",
              "type": "number",
              "name": "ino",
              "desc": "<p>The file system specific &quot;Inode&quot; number for the file.</p>\n"
            },
            {
              "textRaw": "`mode` {number} ",
              "type": "number",
              "name": "mode",
              "desc": "<p>A bit-field describing the file type and mode.</p>\n"
            },
            {
              "textRaw": "`nlink` {number} ",
              "type": "number",
              "name": "nlink",
              "desc": "<p>The number of hard-links that exist for the file.</p>\n"
            },
            {
              "textRaw": "`uid` {number} ",
              "type": "number",
              "name": "uid",
              "desc": "<p>The numeric user identifier of the user that owns the file (POSIX).</p>\n"
            },
            {
              "textRaw": "`gid` {number} ",
              "type": "number",
              "name": "gid",
              "desc": "<p>The numeric group identifier of the group that owns the file (POSIX).</p>\n"
            },
            {
              "textRaw": "`rdev` {number} ",
              "type": "number",
              "name": "rdev",
              "desc": "<p>A numeric device identifier if the file is considered &quot;special&quot;.</p>\n"
            },
            {
              "textRaw": "`size` {number} ",
              "type": "number",
              "name": "size",
              "desc": "<p>The size of the file in bytes.</p>\n"
            },
            {
              "textRaw": "`blksize` {number} ",
              "type": "number",
              "name": "blksize",
              "desc": "<p>The file system block size for i/o operations.</p>\n"
            },
            {
              "textRaw": "`blocks` {number} ",
              "type": "number",
              "name": "blocks",
              "desc": "<p>The number of blocks allocated for this file.</p>\n"
            },
            {
              "textRaw": "`atimeMs` {number} ",
              "type": "number",
              "name": "atimeMs",
              "meta": {
                "added": [
                  "v8.1.0"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the last time this file was accessed expressed in\nmilliseconds since the POSIX Epoch.</p>\n"
            },
            {
              "textRaw": "`mtimeMs` {number} ",
              "type": "number",
              "name": "mtimeMs",
              "meta": {
                "added": [
                  "v8.1.0"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the last time this file was modified expressed in\nmilliseconds since the POSIX Epoch.</p>\n"
            },
            {
              "textRaw": "`ctimeMs` {number} ",
              "type": "number",
              "name": "ctimeMs",
              "meta": {
                "added": [
                  "v8.1.0"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the last time the file status was changed expressed\nin milliseconds since the POSIX Epoch.</p>\n"
            },
            {
              "textRaw": "`birthtimeMs` {number} ",
              "type": "number",
              "name": "birthtimeMs",
              "meta": {
                "added": [
                  "v8.1.0"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the creation time of this file expressed in\nmilliseconds since the POSIX Epoch.</p>\n"
            },
            {
              "textRaw": "`atime` {Date} ",
              "type": "Date",
              "name": "atime",
              "meta": {
                "added": [
                  "v0.11.13"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the last time this file was accessed.</p>\n"
            },
            {
              "textRaw": "`mtime` {Date} ",
              "type": "Date",
              "name": "mtime",
              "meta": {
                "added": [
                  "v0.11.13"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the last time this file was modified.</p>\n"
            },
            {
              "textRaw": "`ctime` {Date} ",
              "type": "Date",
              "name": "ctime",
              "meta": {
                "added": [
                  "v0.11.13"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the last time the file status was changed.</p>\n"
            },
            {
              "textRaw": "`birthtime` {Date} ",
              "type": "Date",
              "name": "birthtime",
              "meta": {
                "added": [
                  "v0.11.13"
                ],
                "changes": []
              },
              "desc": "<p>The timestamp indicating the creation time of this file.</p>\n"
            }
          ],
          "modules": [
            {
              "textRaw": "Stat Time Values",
              "name": "stat_time_values",
              "desc": "<p>The <code>atimeMs</code>, <code>mtimeMs</code>, <code>ctimeMs</code>, <code>birthtimeMs</code> properties are\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type\">numbers</a> that hold the corresponding times in milliseconds. Their\nprecision is platform specific. <code>atime</code>, <code>mtime</code>, <code>ctime</code>, and <code>birthtime</code> are\n<a href=\"https://developer.mozilla.org/en-US/JavaScript/Reference/Global_Objects/Date\"><code>Date</code></a> object alternate representations of the various times. The\n<code>Date</code> and number values are not connected. Assigning a new number value, or\nmutating the <code>Date</code> value, will not be reflected in the corresponding alternate\nrepresentation.</p>\n<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.js 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.</p>\n",
              "params": []
            },
            {
              "textRaw": "Event: 'open'",
              "type": "event",
              "name": "open",
              "meta": {
                "added": [
                  "v0.1.93"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>Emitted when the <code>WriteStream</code>&#39;s file is opened.</p>\n"
            },
            {
              "textRaw": "Event: 'ready'",
              "type": "event",
              "name": "ready",
              "meta": {
                "added": [
                  "v9.11.0"
                ],
                "changes": []
              },
              "desc": "<p>Emitted when the <code>fs.WriteStream</code> is ready to be used.</p>\n<p>Fires immediately after <code>&#39;open&#39;</code>.</p>\n",
              "params": []
            }
          ],
          "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.js `< 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} **Default:** `fs.constants.F_OK` ",
                  "name": "mode",
                  "type": "integer",
                  "default": "`fs.constants.F_OK`",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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 (e.g. <code>fs.constants.W_OK | fs.constants.R_OK</code>).</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 an <code>Error</code> object. 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><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 will not 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} **Default:** `fs.constants.F_OK` ",
                  "name": "mode",
                  "type": "integer",
                  "default": "`fs.constants.F_OK`",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronously tests a user&#39;s permissions for the file or directory specified by\n<code>path</code>. The <code>mode</code> argument is an optional integer that specifies the\naccessibility checks to be performed. The following constants define the\npossible values of <code>mode</code>. It is possible to create a mask consisting of the\nbitwise OR of two or more values (e.g. <code>fs.constants.W_OK | fs.constants.R_OK</code>).</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>If any of the accessibility checks fail, an <code>Error</code> will be thrown. Otherwise,\nthe method will return <code>undefined</code>.</p>\n<pre><code class=\"lang-js\">try {\n  fs.accessSync(&#39;etc/passwd&#39;, fs.constants.R_OK | fs.constants.W_OK);\n  console.log(&#39;can read/write&#39;);\n} catch (err) {\n  console.error(&#39;no access!&#39;);\n}\n</code></pre>\n"
        },
        {
          "textRaw": "fs.appendFile(file, data[, options], callback)",
          "type": "method",
          "name": "appendFile",
          "meta": {
            "added": [
              "v0.6.7"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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|URL|number} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|URL|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",
                      "default": "`'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} **Default:** `'a'` ",
                      "name": "flag",
                      "type": "string",
                      "default": "`'a'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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\nexist. <code>data</code> can be a string or a <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>.</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>The <code>file</code> may be specified as a numeric file descriptor that has been opened\nfor appending (using <code>fs.open()</code> or <code>fs.openSync()</code>). The file descriptor will\nnot be closed automatically.</p>\n<pre><code class=\"lang-js\">fs.open(&#39;message.txt&#39;, &#39;a&#39;, (err, fd) =&gt; {\n  if (err) throw err;\n  fs.appendFile(fd, &#39;data to append&#39;, &#39;utf8&#39;, (err) =&gt; {\n    fs.close(fd, (err) =&gt; {\n      if (err) throw err;\n    });\n    if (err) throw err;\n  });\n});\n</code></pre>\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|URL|number} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|URL|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",
                      "default": "`'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} **Default:** `'a'` ",
                      "name": "flag",
                      "type": "string",
                      "default": "`'a'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "file"
                },
                {
                  "name": "data"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronously append data to a file, creating the file if it does not yet\nexist. <code>data</code> can be a string or a <a href=\"buffer.html#buffer_buffer\"><code>Buffer</code></a>.</p>\n<p>Example:</p>\n<pre><code class=\"lang-js\">try {\n  fs.appendFileSync(&#39;message.txt&#39;, &#39;data to append&#39;);\n  console.log(&#39;The &quot;data to append&quot; was appended to file!&#39;);\n} catch (err) {\n  /* Handle the error */\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.appendFileSync(&#39;message.txt&#39;, &#39;data to append&#39;, &#39;utf8&#39;);\n</code></pre>\n<p>The <code>file</code> may be specified as a numeric file descriptor that has been opened\nfor appending (using <code>fs.open()</code> or <code>fs.openSync()</code>). The file descriptor will\nnot be closed automatically.</p>\n<pre><code class=\"lang-js\">let fd;\n\ntry {\n  fd = fs.openSync(&#39;message.txt&#39;, &#39;a&#39;);\n  fs.appendFileSync(fd, &#39;data to append&#39;, &#39;utf8&#39;);\n} catch (err) {\n  /* Handle the error */\n} finally {\n  if (fd !== undefined)\n    fs.closeSync(fd);\n}\n</code></pre>\n"
        },
        {
          "textRaw": "fs.chmod(path, mode, callback)",
          "type": "method",
          "name": "chmod",
          "meta": {
            "added": [
              "v0.1.30"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously changes the permissions of a file. No arguments other than a\npossible exception are given to the completion callback.</p>\n<p>See also: chmod(2)</p>\n",
          "modules": [
            {
              "textRaw": "File modes",
              "name": "file_modes",
              "desc": "<p>The <code>mode</code> argument used in both the <code>fs.chmod()</code> and <code>fs.chmodSync()</code>\nmethods is a numeric bitmask created using a logical OR of the following\nconstants:</p>\n<table>\n<thead>\n<tr>\n<th>Constant</th>\n<th>Octal</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>fs.constants.S_IRUSR</code></td>\n<td><code>0o400</code></td>\n<td>read by owner</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IWUSR</code></td>\n<td><code>0o200</code></td>\n<td>write by owner</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IXUSR</code></td>\n<td><code>0o100</code></td>\n<td>execute/search by owner</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IRGRP</code></td>\n<td><code>0o40</code></td>\n<td>read by group</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IWGRP</code></td>\n<td><code>0o20</code></td>\n<td>write by group</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IXGRP</code></td>\n<td><code>0o10</code></td>\n<td>execute/search by group</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IROTH</code></td>\n<td><code>0o4</code></td>\n<td>read by others</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IWOTH</code></td>\n<td><code>0o2</code></td>\n<td>write by others</td>\n</tr>\n<tr>\n<td><code>fs.constants.S_IXOTH</code></td>\n<td><code>0o1</code></td>\n<td>execute/search by others</td>\n</tr>\n</tbody>\n</table>\n<p>An easier method of constructing the <code>mode</code> is to use a sequence of three\noctal digits (e.g. <code>765</code>). The left-most digit (<code>7</code> in the example), specifies\nthe permissions for the file owner. The middle digit (<code>6</code> in the example),\nspecifies permissions for the group. The right-most digit (<code>5</code> in the example),\nspecifies the permissions for others.</p>\n<table>\n<thead>\n<tr>\n<th>Number</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>7</code></td>\n<td>read, write, and execute</td>\n</tr>\n<tr>\n<td><code>6</code></td>\n<td>read and write</td>\n</tr>\n<tr>\n<td><code>5</code></td>\n<td>read and execute</td>\n</tr>\n<tr>\n<td><code>4</code></td>\n<td>read only</td>\n</tr>\n<tr>\n<td><code>3</code></td>\n<td>write and execute</td>\n</tr>\n<tr>\n<td><code>2</code></td>\n<td>write only</td>\n</tr>\n<tr>\n<td><code>1</code></td>\n<td>execute only</td>\n</tr>\n<tr>\n<td><code>0</code></td>\n<td>no permission</td>\n</tr>\n</tbody>\n</table>\n<p>For example, the octal value <code>0o765</code> means:</p>\n<ul>\n<li>The owner may read, write and execute the file.</li>\n<li>The group may read and write the file.</li>\n<li>Others may read and execute the file.</li>\n</ul>\n",
              "type": "module",
              "displayName": "File modes"
            }
          ]
        },
        {
          "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>Synchronously changes the permissions of a file. Returns <code>undefined</code>.\nThis is the synchronous version of <a href=\"#fs_fs_chmod_path_mode_callback\"><code>fs.chmod()</code></a>.</p>\n<p>See also: chmod(2)</p>\n"
        },
        {
          "textRaw": "fs.chown(path, uid, gid, callback)",
          "type": "method",
          "name": "chown",
          "meta": {
            "added": [
              "v0.1.97"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "uid"
                },
                {
                  "name": "gid"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously changes owner and group of a file. No arguments other than a\npossible exception are given to the completion callback.</p>\n<p>See also: chown(2)</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>Synchronously changes owner and group of a file. Returns <code>undefined</code>.\nThis is the synchronous version of <a href=\"#fs_fs_chown_path_uid_gid_callback\"><code>fs.chown()</code></a>.</p>\n<p>See also: chown(2)</p>\n"
        },
        {
          "textRaw": "fs.close(fd, callback)",
          "type": "method",
          "name": "close",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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.copyFile(src, dest[, flags], callback)",
          "type": "method",
          "name": "copyFile",
          "meta": {
            "added": [
              "v8.5.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`src` {string|Buffer|URL} source filename to copy ",
                  "name": "src",
                  "type": "string|Buffer|URL",
                  "desc": "source filename to copy"
                },
                {
                  "textRaw": "`dest` {string|Buffer|URL} destination filename of the copy operation ",
                  "name": "dest",
                  "type": "string|Buffer|URL",
                  "desc": "destination filename of the copy operation"
                },
                {
                  "textRaw": "`flags` {number} modifiers for copy operation. **Default:** `0`. ",
                  "name": "flags",
                  "type": "number",
                  "default": "`0`",
                  "desc": "modifiers for copy operation.",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "src"
                },
                {
                  "name": "dest"
                },
                {
                  "name": "flags",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously copies <code>src</code> to <code>dest</code>. By default, <code>dest</code> is overwritten if it\nalready exists. No arguments other than a possible exception are given to the\ncallback function. Node.js makes no guarantees about the atomicity of the copy\noperation. If an error occurs after the destination file has been opened for\nwriting, Node.js will attempt to remove the destination.</p>\n<p><code>flags</code> is an optional integer that specifies the behavior\nof the copy operation. It is possible to create a mask consisting of the bitwise\nOR of two or more values (e.g.\n<code>fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE</code>).</p>\n<ul>\n<li><code>fs.constants.COPYFILE_EXCL</code> - The copy operation will fail if <code>dest</code> already\nexists.</li>\n<li><code>fs.constants.COPYFILE_FICLONE</code> - The copy operation will attempt to create a\ncopy-on-write reflink. If the platform does not support copy-on-write, then a\nfallback copy mechanism is used.</li>\n<li><code>fs.constants.COPYFILE_FICLONE_FORCE</code> - The copy operation will attempt to\ncreate a copy-on-write reflink. If the platform does not support copy-on-write,\nthen the operation will fail.</li>\n</ul>\n<p>Example:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\n// destination.txt will be created or overwritten by default.\nfs.copyFile(&#39;source.txt&#39;, &#39;destination.txt&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;source.txt was copied to destination.txt&#39;);\n});\n</code></pre>\n<p>If the third argument is a number, then it specifies <code>flags</code>, as shown in the\nfollowing example.</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\nconst { COPYFILE_EXCL } = fs.constants;\n\n// By using COPYFILE_EXCL, the operation will fail if destination.txt exists.\nfs.copyFile(&#39;source.txt&#39;, &#39;destination.txt&#39;, COPYFILE_EXCL, callback);\n</code></pre>\n"
        },
        {
          "textRaw": "fs.copyFileSync(src, dest[, flags])",
          "type": "method",
          "name": "copyFileSync",
          "meta": {
            "added": [
              "v8.5.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`src` {string|Buffer|URL} source filename to copy ",
                  "name": "src",
                  "type": "string|Buffer|URL",
                  "desc": "source filename to copy"
                },
                {
                  "textRaw": "`dest` {string|Buffer|URL} destination filename of the copy operation ",
                  "name": "dest",
                  "type": "string|Buffer|URL",
                  "desc": "destination filename of the copy operation"
                },
                {
                  "textRaw": "`flags` {number} modifiers for copy operation. **Default:** `0`. ",
                  "name": "flags",
                  "type": "number",
                  "default": "`0`",
                  "desc": "modifiers for copy operation.",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "src"
                },
                {
                  "name": "dest"
                },
                {
                  "name": "flags",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronously copies <code>src</code> to <code>dest</code>. By default, <code>dest</code> is overwritten if it\nalready exists. Returns <code>undefined</code>. Node.js makes no guarantees about the\natomicity of the copy operation. If an error occurs after the destination file\nhas been opened for writing, Node.js will attempt to remove the destination.</p>\n<p><code>flags</code> is an optional integer that specifies the behavior\nof the copy operation. It is possible to create a mask consisting of the bitwise\nOR of two or more values (e.g.\n<code>fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE</code>).</p>\n<ul>\n<li><code>fs.constants.COPYFILE_EXCL</code> - The copy operation will fail if <code>dest</code> already\nexists.</li>\n<li><code>fs.constants.COPYFILE_FICLONE</code> - The copy operation will attempt to create a\ncopy-on-write reflink. If the platform does not support copy-on-write, then a\nfallback copy mechanism is used.</li>\n<li><code>fs.constants.COPYFILE_FICLONE_FORCE</code> - The copy operation will attempt to\ncreate a copy-on-write reflink. If the platform does not support copy-on-write,\nthen the operation will fail.</li>\n</ul>\n<p>Example:</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\n\n// destination.txt will be created or overwritten by default.\nfs.copyFileSync(&#39;source.txt&#39;, &#39;destination.txt&#39;);\nconsole.log(&#39;source.txt was copied to destination.txt&#39;);\n</code></pre>\n<p>If the third argument is a number, then it specifies <code>flags</code>, as shown in the\nfollowing example.</p>\n<pre><code class=\"lang-js\">const fs = require(&#39;fs&#39;);\nconst { COPYFILE_EXCL } = fs.constants;\n\n// By using COPYFILE_EXCL, the operation will fail if destination.txt exists.\nfs.copyFileSync(&#39;source.txt&#39;, &#39;destination.txt&#39;, COPYFILE_EXCL);\n</code></pre>\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": [
            {
              "return": {
                "textRaw": "Returns: {fs.ReadStream} See [Readable Streams][]. ",
                "name": "return",
                "type": "fs.ReadStream",
                "desc": "See [Readable Streams][]."
              },
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`flags` {string} **Default:** `'r'` ",
                      "name": "flags",
                      "type": "string",
                      "default": "`'r'`"
                    },
                    {
                      "textRaw": "`encoding` {string} **Default:** `null` ",
                      "name": "encoding",
                      "type": "string",
                      "default": "`null`"
                    },
                    {
                      "textRaw": "`fd` {integer} **Default:** `null` ",
                      "name": "fd",
                      "type": "integer",
                      "default": "`null`"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666`"
                    },
                    {
                      "textRaw": "`autoClose` {boolean} **Default:** `true` ",
                      "name": "autoClose",
                      "type": "boolean",
                      "default": "`true`"
                    },
                    {
                      "textRaw": "`start` {integer} ",
                      "name": "start",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`end` {integer} **Default:** `Infinity` ",
                      "name": "end",
                      "type": "integer",
                      "default": "`Infinity`"
                    },
                    {
                      "textRaw": "`highWaterMark` {integer} **Default:** `64 * 1024` ",
                      "name": "highWaterMark",
                      "type": "integer",
                      "default": "`64 * 1024`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<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> 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>&#39;error&#39;</code> or <code>&#39;end&#39;</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": [
            {
              "return": {
                "textRaw": "Returns: {fs.WriteStream} See [Writable Stream][]. ",
                "name": "return",
                "type": "fs.WriteStream",
                "desc": "See [Writable Stream][]."
              },
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`flags` {string} **Default:** `'w'` ",
                      "name": "flags",
                      "type": "string",
                      "default": "`'w'`"
                    },
                    {
                      "textRaw": "`encoding` {string} **Default:** `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "default": "`'utf8'`"
                    },
                    {
                      "textRaw": "`fd` {integer} **Default:** `null` ",
                      "name": "fd",
                      "type": "integer",
                      "default": "`null`"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666`"
                    },
                    {
                      "textRaw": "`autoClose` {boolean} **Default:** `true` ",
                      "name": "autoClose",
                      "type": "boolean",
                      "default": "`true`"
                    },
                    {
                      "textRaw": "`start` {integer} ",
                      "name": "start",
                      "type": "integer"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<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>encoding</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>&#39;error&#39;</code> or <code>&#39;finish&#39;</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, <a href=\"#fs_class_fs_writestream\"><code>WriteStream</code></a> 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} ",
                  "options": [
                    {
                      "textRaw": "`exists` {boolean} ",
                      "name": "exists",
                      "type": "boolean"
                    }
                  ],
                  "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><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      if (err) throw err;\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": [
            {
              "return": {
                "textRaw": "Returns: {boolean} ",
                "name": "return",
                "type": "boolean"
              },
              "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 path 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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`stats` {fs.Stats} ",
                      "name": "stats",
                      "type": "fs.Stats"
                    }
                  ],
                  "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": [
            {
              "return": {
                "textRaw": "Returns: {fs.Stats} ",
                "name": "return",
                "type": "fs.Stats"
              },
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous fstat(2).</p>\n"
        },
        {
          "textRaw": "fs.fsync(fd, callback)",
          "type": "method",
          "name": "fsync",
          "meta": {
            "added": [
              "v0.1.96"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fd` {integer} ",
                  "name": "fd",
                  "type": "integer"
                },
                {
                  "textRaw": "`len` {integer} **Default:** `0` ",
                  "name": "len",
                  "type": "integer",
                  "default": "`0`",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "len",
                  "optional": true
                },
                {
                  "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;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 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",
                  "default": "`0`",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "len",
                  "optional": true
                }
              ]
            }
          ],
          "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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` {number|string|Date} ",
                  "name": "atime",
                  "type": "number|string|Date"
                },
                {
                  "textRaw": "`mtime` {number|string|Date} ",
                  "name": "mtime",
                  "type": "number|string|Date"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "fd"
                },
                {
                  "name": "atime"
                },
                {
                  "name": "mtime"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Change the file system timestamps of the object referenced by the supplied file\ndescriptor. See <a href=\"#fs_fs_utimes_path_atime_mtime_callback\"><code>fs.utimes()</code></a>.</p>\n<p>This function does not work on AIX versions before 7.1, it will return the\nerror <code>UV_ENOSYS</code>.</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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} ",
                  "name": "mode",
                  "type": "integer"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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|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 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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`stats` {fs.Stats} ",
                      "name": "stats",
                      "type": "fs.Stats"
                    }
                  ],
                  "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": [
            {
              "return": {
                "textRaw": "Returns: {fs.Stats} ",
                "name": "return",
                "type": "fs.Stats"
              },
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous lstat(2).</p>\n"
        },
        {
          "textRaw": "fs.mkdir(path[, mode], callback)",
          "type": "method",
          "name": "mkdir",
          "meta": {
            "added": [
              "v0.1.8"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`mode` {integer} **Default:** `0o777` ",
                  "name": "mode",
                  "type": "integer",
                  "default": "`0o777`",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously creates a directory. No arguments other than a possible exception\nare given to the completion callback.</p>\n<p>See also: mkdir(2)</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} **Default:** `0o777` ",
                  "name": "mode",
                  "type": "integer",
                  "default": "`0o777`",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "mode",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronously creates a directory. Returns <code>undefined</code>.\nThis is the synchronous version of <a href=\"#fs_fs_mkdir_path_mode_callback\"><code>fs.mkdir()</code></a>.</p>\n<p>See also: mkdir(2)</p>\n"
        },
        {
          "textRaw": "fs.mkdtemp(prefix[, options], callback)",
          "type": "method",
          "name": "mkdtemp",
          "meta": {
            "added": [
              "v5.10.0"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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",
                      "default": "`'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`folder` {string} ",
                      "name": "folder",
                      "type": "string"
                    }
                  ],
                  "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(path.join(os.tmpdir(), &#39;foo-&#39;), (err, folder) =&gt; {\n  if (err) throw err;\n  console.log(folder);\n  // Prints: /tmp/foo-itXde2 or C:\\Users\\...\\AppData\\Local\\Temp\\foo-itXde2\n});\n</code></pre>\n<p>The <code>fs.mkdtemp()</code> method will append the six randomly selected characters\ndirectly to the <code>prefix</code> string. For instance, given a directory <code>/tmp</code>, if the\nintention is to create a temporary directory <em>within</em> <code>/tmp</code>, the <code>prefix</code>\n<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 = os.tmpdir();\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": [
            {
              "return": {
                "textRaw": "Returns: {string} ",
                "name": "return",
                "type": "string"
              },
              "params": [
                {
                  "textRaw": "`prefix` {string} ",
                  "name": "prefix",
                  "type": "string"
                },
                {
                  "textRaw": "`options` {string|Object} ",
                  "options": [
                    {
                      "textRaw": "`encoding` {string} **Default:** `'utf8'` ",
                      "name": "encoding",
                      "type": "string",
                      "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": "v9.9.0",
                "pr-url": "https://github.com/nodejs/node/pull/18801",
                "description": "The `as` and `as+` modes are supported now."
              },
              {
                "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} **Default:** `0o666` (readable and writable) ",
                  "name": "mode",
                  "type": "integer",
                  "default": "`0o666` (readable and writable)",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`fd` {integer} ",
                      "name": "fd",
                      "type": "integer"
                    }
                  ],
                  "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;as&#39;</code> - Open file for appending in synchronous mode.\nThe file is created if it does not exist.</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<li><p><code>&#39;as+&#39;</code> - Open file for reading and appending in synchronous mode.\nThe file is created if it does not exist.</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.</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>The behavior of <code>fs.open()</code> is platform-specific for some flags. As such,\nopening 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<p>Some characters (<code>&lt; &gt; : &quot; / \\ | ? *</code>) are reserved under Windows as documented\nby <a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx\">Naming Files, Paths, and Namespaces</a>. Under NTFS, if the filename contains\na colon, Node.js will open a file system stream, as described by\n<a href=\"https://msdn.microsoft.com/en-us/library/windows/desktop/bb540537.aspx\">this MSDN page</a>.</p>\n<p>Functions based on <code>fs.open()</code> exhibit this behavior as well. eg.\n<code>fs.writeFile()</code>, <code>fs.readFile()</code>, etc.</p>\n<p><em>Note:</em> On Windows, opening an existing hidden file using the <code>w</code> flag (either\nthrough <code>fs.open()</code> or <code>fs.writeFile()</code>) will fail with <code>EPERM</code>. Existing hidden\nfiles can be opened for writing with the <code>r+</code> flag. A call to <code>fs.ftruncate()</code>\ncan be used to reset the file contents.</p>\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": [
            {
              "return": {
                "textRaw": "Returns: {number} ",
                "name": "return",
                "type": "number"
              },
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`flags` {string|number} ",
                  "name": "flags",
                  "type": "string|number"
                },
                {
                  "textRaw": "`mode` {integer} **Default:** `0o666` ",
                  "name": "mode",
                  "type": "integer",
                  "default": "`0o666`",
                  "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`bytesRead` {integer} ",
                      "name": "bytesRead",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`buffer` {Buffer} ",
                      "name": "buffer",
                      "type": "Buffer"
                    }
                  ],
                  "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 argument 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,\nand the file position will be updated.\nIf <code>position</code> is an integer, the file position will remain unchanged.</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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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",
                      "default": "`'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`files` {string[]|Buffer[]} ",
                      "name": "files",
                      "type": "string[]|Buffer[]"
                    }
                  ],
                  "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": [
            {
              "return": {
                "textRaw": "Returns: {string[]} An array of filenames excluding `'.'` and `'..'`. ",
                "name": "return",
                "type": "string[]",
                "desc": "An array of filenames excluding `'.'` and `'..'`."
              },
              "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",
                      "default": "`'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronous readdir(3).</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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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",
                      "default": "`null`"
                    },
                    {
                      "textRaw": "`flag` {string} **Default:** `'r'` ",
                      "name": "flag",
                      "type": "string",
                      "default": "`'r'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`data` {string|Buffer} ",
                      "name": "data",
                      "type": "string|Buffer"
                    }
                  ],
                  "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>When the path is a directory, the behavior of <code>fs.readFile()</code> and\n<a href=\"#fs_fs_readfilesync_path_options\"><code>fs.readFileSync()</code></a> is platform-specific. On macOS, Linux, and Windows, an\nerror will be returned. On FreeBSD, a representation of the directory&#39;s contents\nwill 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>If a file descriptor is specified as the <code>path</code>, it will not be closed\nautomatically.</p>\n<p>The <code>fs.readFile()</code> function buffers the entire file. To minimize memory costs,\nwhen possible prefer streaming via <code>fs.createReadStream()</code>.</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": [
            {
              "return": {
                "textRaw": "Returns: {string|Buffer} ",
                "name": "return",
                "type": "string|Buffer"
              },
              "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",
                      "default": "`null`"
                    },
                    {
                      "textRaw": "`flag` {string} **Default:** `'r'` ",
                      "name": "flag",
                      "type": "string",
                      "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>Similar to <a href=\"#fs_fs_readfile_path_options_callback\"><code>fs.readFile()</code></a>, when the path is a directory, the behavior of\n<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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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",
                      "default": "`'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`linkString` {string|Buffer} ",
                      "name": "linkString",
                      "type": "string|Buffer"
                    }
                  ],
                  "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": [
            {
              "return": {
                "textRaw": "Returns: {string|Buffer} ",
                "name": "return",
                "type": "string|Buffer"
              },
              "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",
                      "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": [
            {
              "return": {
                "textRaw": "Returns: {number} ",
                "name": "return",
                "type": "number"
              },
              "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"
                }
              ]
            },
            {
              "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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",
                      "default": "`'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`resolvedPath` {string|Buffer} ",
                      "name": "resolvedPath",
                      "type": "string|Buffer"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously computes the canonical pathname by resolving <code>.</code>, <code>..</code> and\nsymbolic links.</p>\n<p>Note that &quot;canonical&quot; does not mean &quot;unique&quot;: hard links and bind mounts can\nexpose a file system entity through many pathnames.</p>\n<p>This function behaves like realpath(3), with some exceptions:</p>\n<ol>\n<li><p>No case conversion is performed on case-insensitive file systems.</p>\n</li>\n<li><p>The maximum number of symbolic links is platform-independent and generally\n(much) higher than what the native realpath(3) implementation supports.</p>\n</li>\n</ol>\n<p>The <code>callback</code> gets two arguments <code>(err, resolvedPath)</code>. May use <code>process.cwd</code>\nto 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>If <code>path</code> resolves to a socket or a pipe, the function will return a system\ndependent 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": [
            {
              "return": {
                "textRaw": "Returns: {string|Buffer} ",
                "name": "return",
                "type": "string|Buffer"
              },
              "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",
                      "default": "`'utf8'`"
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "options",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Synchronously computes the canonical pathname by resolving <code>.</code>, <code>..</code> and\nsymbolic links.</p>\n<p>Note that &quot;canonical&quot; does not mean &quot;unique&quot;: hard links and bind mounts can\nexpose a file system entity through many pathnames.</p>\n<p>This function behaves like realpath(3), with some exceptions:</p>\n<ol>\n<li><p>No case conversion is performed on case-insensitive file systems.</p>\n</li>\n<li><p>The maximum number of symbolic links is platform-independent and generally\n(much) higher than what the native realpath(3) implementation supports.</p>\n</li>\n</ol>\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>If <code>path</code> resolves to a socket or a pipe, the function will return a system\ndependent name for that object.</p>\n"
        },
        {
          "textRaw": "fs.rename(oldPath, newPath, callback)",
          "type": "method",
          "name": "rename",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "oldPath"
                },
                {
                  "name": "newPath"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously rename file at <code>oldPath</code> to the pathname provided\nas <code>newPath</code>. In the case that <code>newPath</code> already exists, it will\nbe overwritten. No arguments other than a possible exception are\ngiven to the completion callback.</p>\n<p>See also: rename(2).</p>\n<pre><code class=\"lang-js\">fs.rename(&#39;oldFile.txt&#39;, &#39;newFile.txt&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;Rename complete!&#39;);\n});\n</code></pre>\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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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<p>Using <code>fs.rmdir()</code> on a file (not a directory) results in an <code>ENOENT</code> error on\nWindows and an <code>ENOTDIR</code> error on POSIX.</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<p>Using <code>fs.rmdirSync()</code> on a file (not a directory) results in an <code>ENOENT</code> error\non Windows and an <code>ENOTDIR</code> error on POSIX.</p>\n"
        },
        {
          "textRaw": "fs.stat(path, callback)",
          "type": "method",
          "name": "stat",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`stats` {fs.Stats} ",
                      "name": "stats",
                      "type": "fs.Stats"
                    }
                  ],
                  "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": [
            {
              "return": {
                "textRaw": "Returns: {fs.Stats} ",
                "name": "return",
                "type": "fs.Stats"
              },
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                }
              ]
            }
          ],
          "desc": "<p>Synchronous stat(2).</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} **Default:** `'file'` ",
                  "name": "type",
                  "type": "string",
                  "default": "`'file'`",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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> 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} **Default:** `'file'` ",
                  "name": "type",
                  "type": "string",
                  "default": "`'file'`",
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`len` {integer} **Default:** `0` ",
                  "name": "len",
                  "type": "integer",
                  "default": "`0`",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "len",
                  "optional": true
                },
                {
                  "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<p>Passing a file descriptor is deprecated and may result in an error being thrown\nin the future.</p>\n"
        },
        {
          "textRaw": "fs.truncateSync(path[, len])",
          "type": "method",
          "name": "truncateSync",
          "meta": {
            "added": [
              "v0.8.6"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`len` {integer} **Default:** `0` ",
                  "name": "len",
                  "type": "integer",
                  "default": "`0`",
                  "optional": true
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "len",
                  "optional": true
                }
              ]
            }
          ],
          "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<p>Passing a file descriptor is deprecated and may result in an error being thrown\nin the future.</p>\n"
        },
        {
          "textRaw": "fs.unlink(path, callback)",
          "type": "method",
          "name": "unlink",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|Buffer|URL} ",
                  "name": "path",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Asynchronously removes a file or symbolic link. No arguments other than a\npossible exception are given to the completion callback.</p>\n<pre><code class=\"lang-js\">// Assuming that &#39;path/file.txt&#39; is a regular file.\nfs.unlink(&#39;path/file.txt&#39;, (err) =&gt; {\n  if (err) throw err;\n  console.log(&#39;path/file.txt was deleted&#39;);\n});\n</code></pre>\n<p><code>fs.unlink()</code> will not work on a directory, empty or otherwise. To remove a\ndirectory, use <a href=\"#fs_fs_rmdir_path_callback\"><code>fs.rmdir()</code></a>.</p>\n<p>See also: unlink(2)</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|URL} ",
                  "name": "filename",
                  "type": "string|Buffer|URL"
                },
                {
                  "textRaw": "`listener` {Function} Optional, a listener previously attached using `fs.watchFile()` ",
                  "name": "listener",
                  "type": "Function",
                  "desc": "Optional, a listener previously attached using `fs.watchFile()`",
                  "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>Using <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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "version": "v8.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/11919",
                "description": "`NaN`, `Infinity`, and `-Infinity` are no longer valid time specifiers."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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` {number|string|Date} ",
                  "name": "atime",
                  "type": "number|string|Date"
                },
                {
                  "textRaw": "`mtime` {number|string|Date} ",
                  "name": "mtime",
                  "type": "number|string|Date"
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "name": "callback",
                  "type": "Function"
                }
              ]
            },
            {
              "params": [
                {
                  "name": "path"
                },
                {
                  "name": "atime"
                },
                {
                  "name": "mtime"
                },
                {
                  "name": "callback"
                }
              ]
            }
          ],
          "desc": "<p>Change the file system timestamps of the object referenced by <code>path</code>.</p>\n<p>The <code>atime</code> and <code>mtime</code> arguments follow these rules:</p>\n<ul>\n<li>Values can be either numbers representing Unix epoch time, <code>Date</code>s, or a\nnumeric string like <code>&#39;123456789.0&#39;</code>.</li>\n<li>If the value can not be converted to a number, or is <code>NaN</code>, <code>Infinity</code> or\n<code>-Infinity</code>, a <code>Error</code> will be thrown.</li>\n</ul>\n"
        },
        {
          "textRaw": "fs.utimesSync(path, atime, mtime)",
          "type": "method",
          "name": "utimesSync",
          "meta": {
            "added": [
              "v0.4.2"
            ],
            "changes": [
              {
                "version": "v8.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/11919",
                "description": "`NaN`, `Infinity`, and `-Infinity` are no longer valid time specifiers."
              },
              {
                "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": [
            {
              "return": {
                "textRaw": "Returns: {fs.FSWatcher} ",
                "name": "return",
                "type": "fs.FSWatcher"
              },
              "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",
                      "default": "`true`",
                      "desc": "Indicates whether the process should continue to run as long as files are being watched."
                    },
                    {
                      "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",
                      "default": "`false`",
                      "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][])."
                    },
                    {
                      "textRaw": "`encoding` {string} Specifies the character encoding to be used for the  filename passed to the listener. **Default:** `'utf8'`. ",
                      "name": "encoding",
                      "type": "string",
                      "default": "`'utf8'`",
                      "desc": "Specifies the character encoding to be used for the  filename passed to the listener."
                    }
                  ],
                  "name": "options",
                  "type": "string|Object",
                  "optional": true
                },
                {
                  "textRaw": "`listener` {Function|undefined} **Default:** `undefined` ",
                  "options": [
                    {
                      "textRaw": "`eventType` {string} ",
                      "name": "eventType",
                      "type": "string"
                    },
                    {
                      "textRaw": "`filename` {string|Buffer} ",
                      "name": "filename",
                      "type": "string|Buffer"
                    }
                  ],
                  "name": "listener",
                  "type": "Function|undefined",
                  "default": "`undefined`",
                  "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.</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>\nis either <code>&#39;rename&#39;</code> or <code>&#39;change&#39;</code>, and <code>filename</code> is the name of the file\nwhich triggered the 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>AIX files retain the same inode for the lifetime of a file. Saving and closing a\nwatched file on AIX will result in two notifications (one for adding new\ncontent, and one for truncation).</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} **Default:** `true` ",
                      "name": "persistent",
                      "type": "boolean",
                      "default": "`true`"
                    },
                    {
                      "textRaw": "`interval` {integer} **Default:** `5007` ",
                      "name": "interval",
                      "type": "integer",
                      "default": "`5007`"
                    }
                  ],
                  "name": "options",
                  "type": "Object",
                  "optional": true
                },
                {
                  "textRaw": "`listener` {Function} ",
                  "options": [
                    {
                      "textRaw": "`current` {fs.Stats} ",
                      "name": "current",
                      "type": "fs.Stats"
                    },
                    {
                      "textRaw": "`previous` {fs.Stats} ",
                      "name": "previous",
                      "type": "fs.Stats"
                    }
                  ],
                  "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.</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>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>Using <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<p>When a file being watched by <code>fs.watchFile()</code> disappears and reappears,\nthen the <code>previousStat</code> reported in the second callback event (the file&#39;s\nreappearance) will be the same as the <code>previousStat</code> of the first callback\nevent (its disappearance).</p>\n<p>This happens when:</p>\n<ul>\n<li>the file is deleted, followed by a restore</li>\n<li>the file is renamed twice - the second time back to its original name</li>\n</ul>\n"
        },
        {
          "textRaw": "fs.write(fd, buffer[, offset[, length[, position]]], callback)",
          "type": "method",
          "name": "write",
          "meta": {
            "added": [
              "v0.0.2"
            ],
            "changes": [
              {
                "version": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`bytesWritten` {integer} ",
                      "name": "bytesWritten",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`buffer` {Buffer|Uint8Array} ",
                      "name": "buffer",
                      "type": "Buffer|Uint8Array"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              }
            ]
          },
          "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} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    },
                    {
                      "textRaw": "`written` {integer} ",
                      "name": "written",
                      "type": "integer"
                    },
                    {
                      "textRaw": "`string` {string} ",
                      "name": "string",
                      "type": "string"
                    }
                  ],
                  "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": "REPLACEME",
                "pr-url": "https://github.com/nodejs/node/pull/12562",
                "description": "The `callback` parameter is no longer optional. Not passing it will throw a `TypeError` at runtime."
              },
              {
                "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 with id DEP0013."
              },
              {
                "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|URL|integer} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|URL|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",
                      "default": "`'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} **Default:** `'w'` ",
                      "name": "flag",
                      "type": "string",
                      "default": "`'w'`"
                    }
                  ],
                  "name": "options",
                  "type": "Object|string",
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function} ",
                  "options": [
                    {
                      "textRaw": "`err` {Error} ",
                      "name": "err",
                      "type": "Error"
                    }
                  ],
                  "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.</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>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|URL|integer} filename or file descriptor ",
                  "name": "file",
                  "type": "string|Buffer|URL|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",
                      "default": "`'utf8'`"
                    },
                    {
                      "textRaw": "`mode` {integer} **Default:** `0o666` ",
                      "name": "mode",
                      "type": "integer",
                      "default": "`0o666`"
                    },
                    {
                      "textRaw": "`flag` {string} **Default:** `'w'` ",
                      "name": "flag",
                      "type": "string",
                      "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": [
            {
              "return": {
                "textRaw": "Returns: {number} ",
                "name": "return",
                "type": "number"
              },
              "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": [
            {
              "return": {
                "textRaw": "Returns: {number} ",
                "name": "return",
                "type": "number"
              },
              "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": "`constants` {Object} ",
          "type": "Object",
          "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"
    }
  ]
}
