Lines Matching full:path
62 <li><a href="path.html" class="nav-path">Path</a></li>
102 <path fill="none" d="M0 0h24v24H0z" />
103 <path d="M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"/>
104 <path d="M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"/>
107 <path d="M0 0h24v24H0z" fill="none" />
108 <path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/>
1042 <li><span class="stability_1"><a href="#all_cli_--snapshot-blobpath"><code>--snapshot-blob=path</code></a></span></li>
1078 <li><span class="stability_1"><a href="#all_cli_--watch-path"><code>--watch-path</code></a></span></li>
1100 <li><a href="#all_cli_node_pathpath"><code>NODE_PATH=path[:…]</code></a></li>
1450 <li><a href="#DEP0034">DEP0034: <code>fs.exists(path, callback)</code></a></li>
1451 <li><a href="#DEP0035">DEP0035: <code>fs.lchmod(path, mode, callback)</code></a></li>
1452 <li><a href="#DEP0036">DEP0036: <code>fs.lchmodSync(path, mode)</code></a></li>
1453 <li><a href="#DEP0037">DEP0037: <code>fs.lchown(path, uid, gid, callback)</code></a></li>
1454 <li><a href="#DEP0038">DEP0038: <code>fs.lchownSync(path, uid, gid)</code></a></li>
1496 <li><a href="#DEP0080">DEP0080: <code>path._makeLong()</code></a></li>
1561 <li><a href="#DEP0147">DEP0147: <code>fs.rmdir(path, { recursive: true })</code></a></li>
1586 <li><a href="#DEP0178">DEP0178: <code>dirent.path</code></a></li>
1758 <li><a href="#all_errors_errorpath"><code>error.path</code></a></li>
2293 <li><a href="#all_fs_fspromisesaccesspath-mode"><code>fsPromises.access(path[, mode])</code></a></li>
2294 <li><a href="#all_fs_fspromisesappendfilepath-data-options"><code>fsPromises.appendFile(path, data[, options])</code></a></li>
2295 <li><a href="#all_fs_fspromiseschmodpath-mode"><code>fsPromises.chmod(path, mode)</code></a></li>
2296 <li><a href="#all_fs_fspromiseschownpath-uid-gid"><code>fsPromises.chown(path, uid, gid)</code></a></li>
2299 <li><a href="#all_fs_fspromiseslchmodpath-mode"><code>fsPromises.lchmod(path, mode)</code></a></li>
2300 <li><a href="#all_fs_fspromiseslchownpath-uid-gid"><code>fsPromises.lchown(path, uid, gid)</code></a></li>
2301 <li><a href="#all_fs_fspromiseslutimespath-atime-mtime"><code>fsPromises.lutimes(path, atime, mtime)</code></a></li>
2303 <li><a href="#all_fs_fspromiseslstatpath-options"><code>fsPromises.lstat(path[, options])</code></a></li>
2304 <li><a href="#all_fs_fspromisesmkdirpath-options"><code>fsPromises.mkdir(path[, options])</code></a></li>
2306 <li><a href="#all_fs_fspromisesopenpath-flags-mode"><code>fsPromises.open(path, flags[, mode])</code></a></li>
2307 <li><a href="#all_fs_fspromisesopendirpath-options"><code>fsPromises.opendir(path[, options])</code></a></li>
2308 <li><a href="#all_fs_fspromisesreaddirpath-options"><code>fsPromises.readdir(path[, options])</code></a></li>
2309 <li><a href="#all_fs_fspromisesreadfilepath-options"><code>fsPromises.readFile(path[, options])</code></a></li>
2310 <li><a href="#all_fs_fspromisesreadlinkpath-options"><code>fsPromises.readlink(path[, options])</code></a></li>
2311 <li><a href="#all_fs_fspromisesrealpathpath-options"><code>fsPromises.realpath(path[, options])</code></a></li>
2313 <li><a href="#all_fs_fspromisesrmdirpath-options"><code>fsPromises.rmdir(path[, options])</code></a></li>
2314 <li><a href="#all_fs_fspromisesrmpath-options"><code>fsPromises.rm(path[, options])</code></a></li>
2315 <li><a href="#all_fs_fspromisesstatpath-options"><code>fsPromises.stat(path[, options])</code></a></li>
2316 <li><a href="#all_fs_fspromisesstatfspath-options"><code>fsPromises.statfs(path[, options])</code></a></li>
2317 <li><a href="#all_fs_fspromisessymlinktarget-path-type"><code>fsPromises.symlink(target, path[, type])</code></a></li>
2318 <li><a href="#all_fs_fspromisestruncatepath-len"><code>fsPromises.truncate(path[, len])</code></a></li>
2319 <li><a href="#all_fs_fspromisesunlinkpath"><code>fsPromises.unlink(path)</code></a></li>
2320 <li><a href="#all_fs_fspromisesutimespath-atime-mtime"><code>fsPromises.utimes(path, atime, mtime)</code></a></li>
2328 <li><a href="#all_fs_fsaccesspath-mode-callback"><code>fs.access(path[, mode], callback)</code></a></li>
2329 <li><a href="#all_fs_fsappendfilepath-data-options-callback"><code>fs.appendFile(path, data[, options], callback)</code></a></li>
2330 <li><a href="#all_fs_fschmodpath-mode-callback"><code>fs.chmod(path, mode, callback)</code></a>
2335 <li><a href="#all_fs_fschownpath-uid-gid-callback"><code>fs.chown(path, uid, gid, callback)</code></a></li>
2339 <li><a href="#all_fs_fscreatereadstreampath-options"><code>fs.createReadStream(path[, options])</code></a></li>
2340 <li><a href="#all_fs_fscreatewritestreampath-options"><code>fs.createWriteStream(path[, options])</code></a></li>
2341 <li><span class="stability_0"><a href="#all_fs_fsexistspath-callback"><code>fs.exists(path, callback)</code></a></span></li>
2349 <li><a href="#all_fs_fslchmodpath-mode-callback"><code>fs.lchmod(path, mode, callback)</code></a></li>
2350 <li><a href="#all_fs_fslchownpath-uid-gid-callback"><code>fs.lchown(path, uid, gid, callback)</code></a></li>
2351 <li><a href="#all_fs_fslutimespath-atime-mtime-callback"><code>fs.lutimes(path, atime, mtime, callback)</code></a></li>
2353 <li><a href="#all_fs_fslstatpath-options-callback"><code>fs.lstat(path[, options], callback)</code></a></li>
2354 <li><a href="#all_fs_fsmkdirpath-options-callback"><code>fs.mkdir(path[, options], callback)</code></a></li>
2356 <li><a href="#all_fs_fsopenpath-flags-mode-callback"><code>fs.open(path[, flags[, mode]], callback)</code></a></li>
2357 <li><a href="#all_fs_fsopendirpath-options-callback"><code>fs.opendir(path[, options], callback)</code></a></li>
2361 <li><a href="#all_fs_fsreaddirpath-options-callback"><code>fs.readdir(path[, options], callback)</code></a></li>
2362 <li><a href="#all_fs_fsreadfilepath-options-callback"><code>fs.readFile(path[, options], callback)</code></a>
2368 <li><a href="#all_fs_fsreadlinkpath-options-callback"><code>fs.readlink(path[, options], callback)</code></a></li>
2370 <li><a href="#all_fs_fsrealpathpath-options-callback"><code>fs.realpath(path[, options], callback)</code></a></li>
2371 <li><a href="#all_fs_fsrealpathnativepath-options-callback"><code>fs.realpath.native(path[, options], callback)</code></a></li>
2373 <li><a href="#all_fs_fsrmdirpath-options-callback"><code>fs.rmdir(path[, options], callback)</code></a></li>
2374 <li><a href="#all_fs_fsrmpath-options-callback"><code>fs.rm(path[, options], callback)</code></a></li>
2375 <li><a href="#all_fs_fsstatpath-options-callback"><code>fs.stat(path[, options], callback)</code></a></li>
2376 <li><a href="#all_fs_fsstatfspath-options-callback"><code>fs.statfs(path[, options], callback)</code></a></li>
2377 <li><a href="#all_fs_fssymlinktarget-path-type-callback"><code>fs.symlink(target, path[, type], callback)</code></a></li>
2378 <li><a href="#all_fs_fstruncatepath-len-callback"><code>fs.truncate(path[, len], callback)</code></a></li>
2379 <li><a href="#all_fs_fsunlinkpath-callback"><code>fs.unlink(path, callback)</code></a></li>
2381 <li><a href="#all_fs_fsutimespath-atime-mtime-callback"><code>fs.utimes(path, atime, mtime, callback)</code></a></li>
2407 <li><a href="#all_fs_fsaccesssyncpath-mode"><code>fs.accessSync(path[, mode])</code></a></li>
2408 <li><a href="#all_fs_fsappendfilesyncpath-data-options"><code>fs.appendFileSync(path, data[, options])</code></a></li>
2409 <li><a href="#all_fs_fschmodsyncpath-mode"><code>fs.chmodSync(path, mode)</code></a></li>
2410 <li><a href="#all_fs_fschownsyncpath-uid-gid"><code>fs.chownSync(path, uid, gid)</code></a></li>
2414 <li><a href="#all_fs_fsexistssyncpath"><code>fs.existsSync(path)</code></a></li>
2422 <li><a href="#all_fs_fslchmodsyncpath-mode"><code>fs.lchmodSync(path, mode)</code></a></li>
2423 <li><a href="#all_fs_fslchownsyncpath-uid-gid"><code>fs.lchownSync(path, uid, gid)</code></a></li>
2424 <li><a href="#all_fs_fslutimessyncpath-atime-mtime"><code>fs.lutimesSync(path, atime, mtime)</code></a></li>
2426 <li><a href="#all_fs_fslstatsyncpath-options"><code>fs.lstatSync(path[, options])</code></a></li>
2427 <li><a href="#all_fs_fsmkdirsyncpath-options"><code>fs.mkdirSync(path[, options])</code></a></li>
2429 <li><a href="#all_fs_fsopendirsyncpath-options"><code>fs.opendirSync(path[, options])</code></a></li>
2430 <li><a href="#all_fs_fsopensyncpath-flags-mode"><code>fs.openSync(path[, flags[, mode]])</code></a></li>
2431 <li><a href="#all_fs_fsreaddirsyncpath-options"><code>fs.readdirSync(path[, options])</code></a></li>
2432 <li><a href="#all_fs_fsreadfilesyncpath-options"><code>fs.readFileSync(path[, options])</code></a></li>
2433 <li><a href="#all_fs_fsreadlinksyncpath-options"><code>fs.readlinkSync(path[, options])</code></a></li>
2437 <li><a href="#all_fs_fsrealpathsyncpath-options"><code>fs.realpathSync(path[, options])</code></a></li>
2438 <li><a href="#all_fs_fsrealpathsyncnativepath-options"><code>fs.realpathSync.native(path[, options])</code></a></li>
2440 <li><a href="#all_fs_fsrmdirsyncpath-options"><code>fs.rmdirSync(path[, options])</code></a></li>
2441 <li><a href="#all_fs_fsrmsyncpath-options"><code>fs.rmSync(path[, options])</code></a></li>
2442 <li><a href="#all_fs_fsstatsyncpath-options"><code>fs.statSync(path[, options])</code></a></li>
2443 <li><a href="#all_fs_fsstatfssyncpath-options"><code>fs.statfsSync(path[, options])</code></a></li>
2444 <li><a href="#all_fs_fssymlinksynctarget-path-type"><code>fs.symlinkSync(target, path[, type])</code></a></li>
2445 <li><a href="#all_fs_fstruncatesyncpath-len"><code>fs.truncateSync(path[, len])</code></a></li>
2446 <li><a href="#all_fs_fsunlinksyncpath"><code>fs.unlinkSync(path)</code></a></li>
2447 <li><a href="#all_fs_fsutimessyncpath-atime-mtime"><code>fs.utimesSync(path, atime, mtime)</code></a></li>
2462 <li><a href="#all_fs_dirpath"><code>dir.path</code></a></li>
2480 <li><span class="stability_0"><a href="#all_fs_direntpath"><code>dirent.path</code></a></span></li>
2505 <li><a href="#all_fs_readstreampath"><code>readStream.path</code></a></li>
2561 <li><a href="#all_fs_writestreampath"><code>writeStream.path</code></a></li>
2732 <li><a href="#all_http_requestpath"><code>request.path</code></a></li>
2986 <li><a href="#all_http2_http2streamrespondwithfilepath-headers-options"><code>http2stream.respondWithFile(path[, headers[, options]])</code></a></li>
3235 <li><a href="#all_modules_modulepath"><code>module.path</code></a></li>
3348 <li><a href="#all_module_modulefindsourcemappath"><code>module.findSourceMap(path)</code></a></li>
3455 <li><a href="#all_net_serverlistenpath-backlog-callback"><code>server.listen(path[, backlog][, callback])</code></a></li>
3485 <li><a href="#all_net_socketconnectpath-connectlistener"><code>socket.connect(path[, connectListener])</code></a></li>
3518 <li><a href="#all_net_netconnectpath-connectlistener"><code>net.connect(path[, connectListener])</code></a></li>
3525 <li><a href="#all_net_netcreateconnectionpath-connectlistener"><code>net.createConnection(path[, connectListener])</code></a></li>
3580 <li><span class="stability_2"><a href="#all_path_path">Path</a></span>
3583 <li><a href="#all_path_pathbasenamepath-suffix"><code>path.basename(path[, suffix])</code></a></li>
3584 <li><a href="#all_path_pathdelimiter"><code>path.delimiter</code></a></li>
3585 <li><a href="#all_path_pathdirnamepath"><code>path.dirname(path)</code></a></li>
3586 <li><a href="#all_path_pathextnamepath"><code>path.extname(path)</code></a></li>
3587 <li><a href="#all_path_pathformatpathobject"><code>path.format(pathObject)</code></a></li>
3588 <li><a href="#all_path_pathisabsolutepath"><code>path.isAbsolute(path)</code></a></li>
3589 <li><a href="#all_path_pathjoinpaths"><code>path.join([...paths])</code></a></li>
3590 <li><a href="#all_path_pathnormalizepath"><code>path.normalize(path)</code></a></li>
3591 <li><a href="#all_path_pathparsepath"><code>path.parse(path)</code></a></li>
3592 <li><a href="#all_path_pathposix"><code>path.posix</code></a></li>
3593 <li><a href="#all_path_pathrelativefrom-to"><code>path.relative(from, to)</code></a></li>
3594 <li><a href="#all_path_pathresolvepaths"><code>path.resolve([...paths])</code></a></li>
3595 <li><a href="#all_path_pathsep"><code>path.sep</code></a></li>
3596 <li><a href="#all_path_pathtonamespacedpathpath"><code>path.toNamespacedPath(path)</code></a></li>
3597 <li><a href="#all_path_pathwin32"><code>path.win32</code></a></li>
4523 <li><a href="#all_tls_tlsconnectpath-options-callback"><code>tls.connect(path[, options][, callback])</code></a></li>
4702 <li><a href="#all_url_urlpathtofileurlpath"><code>url.pathToFileURL(path)</code></a></li>
4715 <li><a href="#all_url_urlobjectpath"><code>urlObject.path</code></a></li>
6536 adding a comment next to the specific code path that should not reject and keep
6594 adding a comment next to the specific code path that should not throw and keep
8264 <span class="hljs-keyword">import</span> path <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
8348 <span class="hljs-keyword">const</span> path = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);
8388 <span class="hljs-keyword">const</span> worker = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Worker</span>(path.<span class="hljs-title function_">resolve</span>(__dirname, <span class="hljs-string">'task_processor.js'</span>));
8674 and exit. The exit path does follow that of an uncaught exception, but
9117 <span class="hljs-keyword">const</span> path = <span class="hljs-string">'.'</span>;
9118 fs.<span class="hljs-title function_">open</span>(path, <span class="hljs-string">'r'</span>, <span class="hljs-function">(<span class="hljs-params">err, fd</span>) =></span> {
9124 <span class="hljs-keyword">const</span> path = <span class="hljs-string">'.'</span>;
9125 fs.<span class="hljs-title function_">open</span>(path, <span class="hljs-string">'r'</span>, <span class="hljs-function">(<span class="hljs-params">err, fd</span>) =></span> {
14123 <p>Because the exact path to the compiled addon binary can vary depending on how
19986 <li><code>[out] result</code>: A URL containing the absolute path of the
20172 <p>The command lookup is performed using the <code>options.env.PATH</code> environment
20173 variable if <code>env</code> is in the <code>options</code> object. Otherwise, <code>process.env.PATH</code> is
20174 used. If <code>options.env</code> is set without <code>PATH</code>, lookup on Unix is performed
20175 on a default search path search of <code>/usr/bin:/bin</code> (see your operating system's
20177 variable <code>PATH</code> is used.</p>
20183 <code>PATH</code> and <code>Path</code>.</p>
20323 <span class="hljs-title function_">exec</span>(<span class="hljs-string">'"/path/to/test file/test.sh" arg1 arg2'</span>);
20324 <span class="hljs-comment">// Double quotes are used so that the space in the path is not interpreted as</span>
20399 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The name or path of the executable file to run.</li>
20559 <code>options</code> object allows for an alternative execution path to be used.</p>
20661 but the path does not exist, the child process emits an <code>ENOENT</code> error
20931 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The name or path of the executable file to run.</li>
21684 <p>Although Microsoft specifies <code>%COMSPEC%</code> must contain the path to
22462 <li><code>exec</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> File path to worker file. <strong>Default:</strong> <code>process.argv[1]</code>.</li>
22614 absolute path, it's resolved as a relative path from the current working
22615 directory. That path is then resolved by <a href="modules.html">CommonJS</a> module loader, or by the
22618 <p>If a file is found, its path will be passed to the
22687 the path specified by <code>--snapshot-blob</code>.</p>
22957 <p>The default is <code>explicit</code>, which requires providing the full path to a
23124 <p>Specify ICU data load path. (Overrides <code>NODE_ICU_DATA</code>.)</p>
23308 <p>By default, when Node.js loads a module from a path that is symbolically linked
23310 actual on-disk "real path" of the module as both an identifier and as a root
23311 path to locate other dependency modules. In most cases, this default behavior
23327 symlink path for modules as opposed to the real path, allowing symbolically
23369 <p>The <code>file</code> name may be an absolute path. If it is not, the default directory it
23507 <h4><code>--snapshot-blob=path</code><span><a class="mark" href="#all_cli_--snapshot-blobpath" id="all_cli_--snapshot-blobpath">#</a></span><a aria-hidden="true" class="legacy" id="cli_snapshot_blob_path"></a></h4>
23512 <p>When used with <code>--build-snapshot</code>, <code>--snapshot-blob</code> specifies the path
23516 path to the blob that is used to restore the application state.</p>
23539 <code>--watch-path</code>, <code>--check</code>, <code>--eval</code>, <code>--interactive</code>, or the inspector.
23823 Use <code>--watch-path</code> to specify what paths to watch.</p>
23827 <h4><code>--watch-path</code><span><a class="mark" href="#all_cli_--watch-path" id="all_cli_--watch-path">#</a></span><a aria-hidden="true" class="legacy" id="cli_watch_path"></a></h4>
23839 <pre><code class="language-console"><span class="hljs-meta prompt_">$ </span><span class="language-bash">node --watch-path=./src --watch-path=./tests index.js</span></code> <button class="copy-button">copy</button></pre>
23912 rules. <code>module</code> may be either a path to a file, or a node module name.</p>
23965 <p>Data path for ICU (<code>Intl</code> object) data. Will extend linked-in data when compiled
23982 <pre><code class="language-bash">NODE_OPTIONS=<span class="hljs-string">'--require "./my path/file.js"'</span></code> <button class="copy-button">copy</button></pre>
24096 <li><code>--watch-path</code></li>
24123 <h4><code>NODE_PATH=path[:…]</code><span><a class="mark" href="#all_cli_node_pathpath" id="all_cli_node_pathpath">#</a></span><a aria-hidden="true" class="legacy" id="cli_node_path_path"></a></h4>
24127 <p><code>':'</code>-separated list of directories prefixed to the module search path.</p>
24162 <p>Path to the file used to store the persistent REPL history. The default path is
24169 <p>Path to a Node.js module which will be loaded in place of the built-in REPL.
24218 <span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"file:///absolute/path/to/source.js"</span><span class="hljs-punctuation">,</span>
24223 <span class="hljs-attr">"file:///absolute/path/to/source.js"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">{</span>
24224 <span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"./path-to-map.json"</span><span class="hljs-punctuation">,</span>
24228 <span class="hljs-string">"file:///absolute/path/to/original.js"</span>
29600 <p><code>engine</code> could be either an id or a path to the engine's shared library.</p>
30011 .include /<absolute path>/fipsmodule.cnf
30030 <pre><code class="language-bash"><span class="hljs-built_in">export</span> OPENSSL_CONF=/<path to configuration file>/nodejs.cnf
30031 <span class="hljs-built_in">export</span> OPENSSL_MODULES=/<path to openssl lib>/ossl-modules</code> <button class="copy-button">copy</button></pre>
30041 .include /<absolute path>/fipsmodule.cnf
30329 <p>To use it, start Node.js with the <code>inspect</code> argument followed by the path to the
31152 <h4 id="DEP0034">DEP0034: <code>fs.exists(path, callback)</code><span><a class="mark" href="#all_deprecations_dep0034-fsexistspath-callback" id="all_deprecations_dep0034-fsexistspath-callback">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0034_fs_exists_path_callback"></a></h4>
31165 <p>The <a href="#all_fs_fsexistspath-callback"><code>fs.exists(path, callback)</code></a> API is deprecated. Please use
31167 <h4 id="DEP0035">DEP0035: <code>fs.lchmod(path, mode, callback)</code><span><a class="mark" href="#all_deprecations_dep0035-fslchmodpath-mode-callback" id="all_deprecations_dep0035-fslchmodpath-mode-callback">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0035_fs_lchmod_path_mode_callback"></a></h4>
31180 <p>The <a href="#all_fs_fslchmodpath-mode-callback"><code>fs.lchmod(path, mode, callback)</code></a> API is deprecated.</p>
31181 <h4 id="DEP0036">DEP0036: <code>fs.lchmodSync(path, mode)</code><span><a class="mark" href="#all_deprecations_dep0036-fslchmodsyncpath-mode" id="all_deprecations_dep0036-fslchmodsyncpath-mode">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0036_fs_lchmodsync_path_mode"></a></h4>
31194 <p>The <a href="#all_fs_fslchmodsyncpath-mode"><code>fs.lchmodSync(path, mode)</code></a> API is deprecated.</p>
31195 <h4 id="DEP0037">DEP0037: <code>fs.lchown(path, uid, gid, callback)</code><span><a class="mark" href="#all_deprecations_dep0037-fslchownpath-uid-gid-callback" id="all_deprecations_dep0037-fslchownpath-uid-gid-callback">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0037_fs_lchown_path_uid_gid_callback"></a></h4>
31210 <p>The <a href="#all_fs_fslchownpath-uid-gid-callback"><code>fs.lchown(path, uid, gid, callback)</code></a> API was deprecated. The
31213 <h4 id="DEP0038">DEP0038: <code>fs.lchownSync(path, uid, gid)</code><span><a class="mark" href="#all_deprecations_dep0038-fslchownsyncpath-uid-gid" id="all_deprecations_dep0038-fslchownsyncpath-uid-gid">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0038_fs_lchownsync_path_uid_gid"></a></h4>
31228 <p>The <a href="#all_fs_fslchownsyncpath-uid-gid"><code>fs.lchownSync(path, uid, gid)</code></a> API was deprecated. The deprecation was
31878 <h4 id="DEP0080">DEP0080: <code>path._makeLong()</code><span><a class="mark" href="#all_deprecations_dep0080-path_makelong" id="all_deprecations_dep0080-path_makelong">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0080_path_makelong"></a></h4>
31889 <p>The internal <code>path._makeLong()</code> was not intended for public use. However,
31891 and replaced with an identical, public <code>path.toNamespacedPath()</code> method.</p>
32900 <h4 id="DEP0147">DEP0147: <code>fs.rmdir(path, { recursive: true })</code><span><a class="mark" href="#all_deprecations_dep0147-fsrmdirpath--recursive-true-" id="all_deprecations_dep0147-fsrmdirpath--recursive-true-">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0147_fs_rmdir_path_recursive_true"></a></h4>
32917 <p>Use <code>fs.rm(path, { recursive: true, force: true })</code>,
32918 <code>fs.rmSync(path, { recursive: true, force: true })</code> or
32919 <code>fs.promises.rm(path, { recursive: true, force: true })</code> instead.</p>
33315 <h4 id="DEP0178">DEP0178: <code>dirent.path</code><span><a class="mark" href="#all_deprecations_dep0178-direntpath" id="all_deprecations_dep0178-direntpath">#</a></span><a aria-hidden="true" class="legacy" id="deprecations_dep0178_dirent_path"></a></h4>
33326 <p>The <a href="#all_fs_direntpath"><code>dirent.path</code></a> is deprecated due to its lack of consistency across
34127 <p>For promises, the argument to the <code>resolve</code> path will be assigned to <code>result</code>
34128 or the argument to the <code>reject</code> path will be assign to <code>error</code>.</p>
36473 <li><code>/absolute/path/to/file.js:line:column</code>, if the frame represents a call in
36541 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If present, the file path destination when reporting a file
36546 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> If present, the file path when reporting a file system error</li>
36565 <p>If present, <code>error.dest</code> is the file path destination when reporting a file
36586 <h4><code>error.path</code><span><a class="mark" href="#all_errors_errorpath" id="all_errors_errorpath">#</a></span><a aria-hidden="true" class="legacy" id="errors_error_path"></a></h4>
36590 <p>If present, <code>error.path</code> is a string containing a relevant invalid pathname.</p>
36645 entity (file or directory) could be found by the given path.</p>
37098 <p>When using <a href="#all_fs_fscpsrc-dest-options-callback"><code>fs.cp()</code></a>, <code>src</code> or <code>dest</code> pointed to an invalid path.</p>
37139 <p>Path is a directory.</p>
37146 <p>An invalid symlink type was passed to the <a href="#all_fs_fssymlinktarget-path-type-callback"><code>fs.symlink()</code></a> or
37147 <a href="#all_fs_fssymlinksynctarget-path-type"><code>fs.symlinkSync()</code></a> methods.</p>
37182 <p>For HTTP/2 requests using the <code>CONNECT</code> method, the <code>:path</code> pseudo-header is
37230 <p>Only valid HTTP/2 pseudoheaders (<code>:status</code>, <code>:path</code>, <code>:authority</code>, <code>:scheme</code>,
37457 <a href="fs.html"><code>fs</code></a> module) encountered a file URL with an incompatible path. The exact
37458 semantics for determining whether a path can be used is platform-dependent.</p>
38118 <p>The path for the main script of a worker is neither an absolute path
38119 nor a relative path starting with <code>./</code> or <code>../</code>.</p>
40589 (<span class="hljs-keyword">async</span> <span class="hljs-keyword">function</span>(<span class="hljs-params">path</span>) {
40591 <span class="hljs-keyword">await</span> <span class="hljs-title function_">unlink</span>(path);
40592 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">`successfully deleted <span class="hljs-subst">${path}</span>`</span>);
41276 <h4><code>fsPromises.access(path[, mode])</code><span><a class="mark" href="#all_fs_fspromisesaccesspath-mode" id="all_fs_fspromisesaccesspath-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_access_path_mode"></a></h4>
41281 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41285 <p>Tests a user's permissions for the file or directory specified by <code>path</code>.
41309 <h4><code>fsPromises.appendFile(path, data[, options])</code><span><a class="mark" href="#all_fs_fspromisesappendfilepath-data-options" id="all_fs_fspromisesappendfilepath-data-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_appendfile_path_data_options"></a></h4>
41314 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="#all_fs_class-filehandle" class="type"><FileHandle></a> filename or <a href="#all_fs_class-filehandle" class="type"><FileHandle></a></li>
41330 <p>The <code>path</code> may be specified as a <a href="#all_fs_class-filehandle" class="type"><FileHandle></a> that has been opened
41332 <h4><code>fsPromises.chmod(path, mode)</code><span><a class="mark" href="#all_fs_fspromiseschmodpath-mode" id="all_fs_fspromiseschmodpath-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_chmod_path_mode"></a></h4>
41337 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41342 <h4><code>fsPromises.chown(path, uid, gid)</code><span><a class="mark" href="#all_fs_fspromiseschownpath-uid-gid" id="all_fs_fspromiseschownpath-uid-gid">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_chown_path_uid_gid"></a></h4>
41347 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41415 <td><p>Accepts an additional <code>verbatimSymlinks</code> option to specify whether to perform path resolution for symlinks.</p></td></tr>
41423 <li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> source path to copy.</li>
41424 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> destination path to copy to.</li>
41435 <li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> source path to copy.</li>
41436 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> destination path to copy to.</li>
41449 <li><code>verbatimSymlinks</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, path resolution for symlinks will
41459 <h4><code>fsPromises.lchmod(path, mode)</code><span><a class="mark" href="#all_fs_fspromiseslchmodpath-mode" id="all_fs_fspromiseslchmodpath-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_lchmod_path_mode"></a></h4>
41464 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41470 <h4><code>fsPromises.lchown(path, uid, gid)</code><span><a class="mark" href="#all_fs_fspromiseslchownpath-uid-gid" id="all_fs_fspromiseslchownpath-uid-gid">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_lchown_path_uid_gid"></a></h4>
41483 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41489 <h4><code>fsPromises.lutimes(path, atime, mtime)</code><span><a class="mark" href="#all_fs_fspromiseslutimespath-atime-mtime" id="all_fs_fspromiseslutimespath-atime-mtime">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_lutimes_path_atime_mtime"></a></h4>
41494 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41500 <a href="#all_fs_fspromisesutimespath-atime-mtime"><code>fsPromises.utimes()</code></a>, with the difference that if the path refers to a
41514 <h4><code>fsPromises.lstat(path[, options])</code><span><a class="mark" href="#all_fs_fspromiseslstatpath-options" id="all_fs_fspromiseslstatpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_lstat_path_options"></a></h4>
41527 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41535 symbolic link <code>path</code>.</li>
41537 <p>Equivalent to <a href="#all_fs_fspromisesstatpath-options"><code>fsPromises.stat()</code></a> unless <code>path</code> refers to a symbolic link,
41540 <h4><code>fsPromises.mkdir(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesmkdirpath-options" id="all_fs_fspromisesmkdirpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_mkdir_path_options"></a></h4>
41545 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41553 is <code>false</code>, or the first directory path created if <code>recursive</code> is <code>true</code>.</li>
41559 <code>fsPromises.mkdir()</code> when <code>path</code> is a directory that exists results in a
41572 <span class="hljs-keyword">const</span> { join } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);
41604 <li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a> Fulfills with a string containing the file system path
41615 <span class="hljs-keyword">import</span> { join } <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
41626 <code>prefix</code> must end with a trailing platform-specific path separator
41627 (<code>require('node:path').sep</code>).</p>
41628 <h4><code>fsPromises.open(path, flags[, mode])</code><span><a class="mark" href="#all_fs_fspromisesopenpath-flags-mode" id="all_fs_fspromisesopenpath-flags-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_open_path_flags_mode"></a></h4>
41641 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41654 <h4><code>fsPromises.opendir(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesopendirpath-options" id="all_fs_fspromisesopendirpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_opendir_path_options"></a></h4>
41669 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41686 <p>The <code>encoding</code> option sets the encoding for the <code>path</code> while opening the
41700 <h4><code>fsPromises.readdir(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesreaddirpath-options" id="all_fs_fspromisesreaddirpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_readdir_path_options"></a></h4>
41715 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41736 <span class="hljs-keyword">const</span> files = <span class="hljs-keyword">await</span> <span class="hljs-title function_">readdir</span>(path);
41742 <h4><code>fsPromises.readFile(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesreadfilepath-options" id="all_fs_fspromisesreadfilepath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_readfile_path_options"></a></h4>
41755 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="#all_fs_class-filehandle" class="type"><FileHandle></a> filename or <code>FileHandle</code></li>
41769 <p>When the <code>path</code> is a directory, the behavior of <code>fsPromises.readFile()</code> is
41784 <span class="hljs-keyword">const</span> { resolve } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);
41815 <h4><code>fsPromises.readlink(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesreadlinkpath-options" id="all_fs_fspromisesreadlinkpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_readlink_path_options"></a></h4>
41820 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41828 <p>Reads the contents of the symbolic link referred to by <code>path</code>. See the POSIX
41833 the link path returned. If the <code>encoding</code> is set to <code>'buffer'</code>, the link path
41835 <h4><code>fsPromises.realpath(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesrealpathpath-options" id="all_fs_fspromisesrealpathpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_realpath_path_options"></a></h4>
41840 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41846 <li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="type"><Promise></a> Fulfills with the resolved path upon success.</li>
41848 <p>Determines the actual location of <code>path</code> using the same semantics as the
41853 the path. If the <code>encoding</code> is set to <code>'buffer'</code>, the path returned will be
41868 <h4><code>fsPromises.rmdir(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesrmdirpath-options" id="all_fs_fspromisesrmdirpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_rmdir_path_options"></a></h4>
41874 <td><p>Using <code>fsPromises.rmdir(path, { recursive: true })</code> on a <code>path</code> that is a file is no longer permitted and results in an <code>ENOENT</code> error on Windows and an <code>ENOTDIR</code> error on POSIX.</p></td></tr>
41876 <td><p>Using <code>fsPromises.rmdir(path, { recursive: true })</code> on a <code>path</code> that does not exist is no longer permitted and results in a <code>ENOENT</code> error.</p></td></tr>
41891 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41909 <p>Removes the directory identified by <code>path</code>.</p>
41915 <h4><code>fsPromises.rm(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesrmpath-options" id="all_fs_fspromisesrmpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_rm_path_options"></a></h4>
41920 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41923 <li><code>force</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, exceptions will be ignored if <code>path</code> does
41940 <h4><code>fsPromises.stat(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesstatpath-options" id="all_fs_fspromisesstatpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_stat_path_options"></a></h4>
41953 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41961 given <code>path</code>.</li>
41963 <h4><code>fsPromises.statfs(path[, options])</code><span><a class="mark" href="#all_fs_fspromisesstatfspath-options" id="all_fs_fspromisesstatfspath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_statfs_path_options"></a></h4>
41968 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41976 given <code>path</code>.</li>
41978 <h4><code>fsPromises.symlink(target, path[, type])</code><span><a class="mark" href="#all_fs_fspromisessymlinktarget-path-type" id="all_fs_fspromisessymlinktarget-path-type">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_symlink_target_path_type"></a></h4>
41984 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
41990 <code>'file'</code>, or <code>'junction'</code>. Windows junction points require the destination path
41992 automatically be normalized to absolute path. Junction points on NTFS volumes
41994 <h4><code>fsPromises.truncate(path[, len])</code><span><a class="mark" href="#all_fs_fspromisestruncatepath-len" id="all_fs_fspromisestruncatepath-len">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_truncate_path_len"></a></h4>
41999 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42003 <p>Truncates (shortens or extends the length) of the content at <code>path</code> to <code>len</code>
42005 <h4><code>fsPromises.unlink(path)</code><span><a class="mark" href="#all_fs_fspromisesunlinkpath" id="all_fs_fspromisesunlinkpath">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_unlink_path"></a></h4>
42010 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42013 <p>If <code>path</code> refers to a symbolic link, then the link is removed without affecting
42014 the file or directory to which that link refers. If the <code>path</code> refers to a file
42015 path that is not a symbolic link, the file is deleted. See the POSIX <a href="http://man7.org/linux/man-pages/man2/unlink.2.html"><code>unlink(2)</code></a>
42017 <h4><code>fsPromises.utimes(path, atime, mtime)</code><span><a class="mark" href="#all_fs_fspromisesutimespath-atime-mtime" id="all_fs_fspromisesutimespath-atime-mtime">#</a></span><a aria-hidden="true" class="legacy" id="fs_fspromises_utimes_path_atime_mtime"></a></h4>
42022 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42027 <p>Change the file system timestamps of the object referenced by <code>path</code>.</p>
42165 <h4><code>fs.access(path[, mode], callback)</code><span><a class="mark" href="#all_fs_fsaccesspath-mode-callback" id="all_fs_fsaccesspath-mode-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_access_path_mode_callback"></a></h4>
42173 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
42182 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42190 <p>Tests a user's permissions for the file or directory specified by <code>path</code>.
42324 ACL and therefore may report that a path is accessible even if the ACL restricts
42326 <h4><code>fs.appendFile(path, data[, options], callback)</code><span><a class="mark" href="#all_fs_fsappendfilepath-data-options-callback" id="all_fs_fsappendfilepath-data-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_appendfile_path_data_options_callback"></a></h4>
42347 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> filename or file descriptor</li>
42376 <p>The <code>path</code> may be specified as a numeric file descriptor that has been opened
42400 <h4><code>fs.chmod(path, mode, callback)</code><span><a class="mark" href="#all_fs_fschmodpath-mode-callback" id="all_fs_fschmodpath-mode-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_chmod_path_mode_callback"></a></h4>
42410 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
42419 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42556 <h4><code>fs.chown(path, uid, gid, callback)</code><span><a class="mark" href="#all_fs_fschownpath-uid-gid-callback" id="all_fs_fschownpath-uid-gid-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_chown_path_uid_gid_callback"></a></h4>
42566 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
42575 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42679 <td><p>Accepts an additional <code>verbatimSymlinks</code> option to specify whether to perform path resolution for symlinks.</p></td></tr>
42687 <li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> source path to copy.</li>
42688 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> destination path to copy to.</li>
42699 <li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> source path to copy.</li>
42700 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> destination path to copy to.</li>
42713 <li><code>verbatimSymlinks</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, path resolution for symlinks will
42723 <h4><code>fs.createReadStream(path[, options])</code><span><a class="mark" href="#all_fs_fscreatereadstreampath-options" id="all_fs_fscreatereadstreampath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_createreadstream_path_options"></a></h4>
42745 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
42756 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42784 <p>If <code>fd</code> is specified, <code>ReadStream</code> will ignore the <code>path</code> argument and will use
42825 <h4><code>fs.createWriteStream(path[, options])</code><span><a class="mark" href="#all_fs_fscreatewritestreampath-options" id="all_fs_fscreatewritestreampath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_createwritestream_path_options"></a></h4>
42845 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
42858 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42895 <code>path</code> argument and will use the specified file descriptor. This means that no
42899 <h4><code>fs.exists(path, callback)</code><span><a class="mark" href="#all_fs_fsexistspath-callback" id="all_fs_fsexistspath-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_exists_path_callback"></a></h4>
42907 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
42917 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
42924 <p>Test whether or not the given path exists by checking with the file system.
43262 <h4><code>fs.lchmod(path, mode, callback)</code><span><a class="mark" href="#all_fs_fslchmodpath-mode-callback" id="all_fs_fslchmodpath-mode-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lchmod_path_mode_callback"></a></h4>
43281 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43293 <h4><code>fs.lchown(path, uid, gid, callback)</code><span><a class="mark" href="#all_fs_fslchownpath-uid-gid-callback" id="all_fs_fslchownpath-uid-gid-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lchown_path_uid_gid_callback"></a></h4>
43312 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43324 <h4><code>fs.lutimes(path, atime, mtime, callback)</code><span><a class="mark" href="#all_fs_fslutimespath-atime-mtime-callback" id="all_fs_fslutimespath-atime-mtime-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lutimes_path_atime_mtime_callback"></a></h4>
43337 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43347 <a href="#all_fs_fsutimespath-atime-mtime-callback"><code>fs.utimes()</code></a>, with the difference that if the path refers to a symbolic
43382 <h4><code>fs.lstat(path[, options], callback)</code><span><a class="mark" href="#all_fs_fslstatpath-options-callback" id="all_fs_fslstatpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lstat_path_options_callback"></a></h4>
43394 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
43403 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43417 <p>Retrieves the <a href="#all_fs_class-fsstats" class="type"><fs.Stats></a> for the symbolic link referred to by the path.
43419 object. <code>lstat()</code> is identical to <code>stat()</code>, except that if <code>path</code> is a symbolic
43422 <h4><code>fs.mkdir(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsmkdirpath-options-callback" id="all_fs_fsmkdirpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_mkdir_path_options_callback"></a></h4>
43430 <td><p>In <code>recursive</code> mode, the callback now receives the first created path as an argument.</p></td></tr>
43436 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
43445 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43455 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> Present only if a directory is created with
43462 first directory path created, <code>(err[, path])</code>.
43463 <code>path</code> can still be <code>undefined</code> when <code>recursive</code> is <code>true</code>, if no directory was
43468 <code>fs.mkdir()</code> when <code>path</code> is a directory that exists results in an error only
43527 <p>The created directory path is passed as a string to the callback's second
43532 <span class="hljs-keyword">import</span> { join } <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
43543 must end with a trailing platform-specific path separator
43544 (<code>require('node:path').sep</code>).</p>
43561 <span class="hljs-keyword">import</span> { sep } <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
43569 <h4><code>fs.open(path[, flags[, mode]], callback)</code><span><a class="mark" href="#all_fs_fsopenpath-flags-mode-callback" id="all_fs_fsopenpath-flags-mode-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_open_path_flags_mode_callback"></a></h4>
43581 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
43588 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43610 <h4><code>fs.opendir(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsopendirpath-options-callback" id="all_fs_fsopendirpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_opendir_path_options_callback"></a></h4>
43627 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43648 <p>The <code>encoding</code> option sets the encoding for the <code>path</code> while opening the
43751 <h4><code>fs.readdir(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsreaddirpath-options-callback" id="all_fs_fsreaddirpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_readdir_path_options_callback"></a></h4>
43765 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
43776 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43801 <h4><code>fs.readFile(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsreadfilepath-options-callback" id="all_fs_fsreadfilepath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_readfile_path_options_callback"></a></h4>
43815 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
43821 <td><p>The <code>path</code> parameter can be a file descriptor now.</p></td></tr>
43828 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li>
43857 <p>When the path is a directory, the behavior of <code>fs.readFile()</code> and
43890 <li>If a file descriptor is specified as the <code>path</code>, it will not be closed
43914 <h4><code>fs.readlink(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsreadlinkpath-options-callback" id="all_fs_fsreadlinkpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_readlink_path_options_callback"></a></h4>
43924 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
43933 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
43946 <p>Reads the contents of the symbolic link referred to by <code>path</code>. The callback gets
43951 the link path passed to the callback. If the <code>encoding</code> is set to <code>'buffer'</code>,
43952 the link path returned will be passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a> object.</p>
43986 <h4><code>fs.realpath(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsrealpathpath-options-callback" id="all_fs_fsrealpathpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_realpath_path_options_callback"></a></h4>
43998 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
44011 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44043 the path passed to the callback. If the <code>encoding</code> is set to <code>'buffer'</code>,
44044 the path returned will be passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a> object.</p>
44045 <p>If <code>path</code> resolves to a socket or a pipe, the function will return a system
44047 <h4><code>fs.realpath.native(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsrealpathnativepath-options-callback" id="all_fs_fsrealpathnativepath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_realpath_native_path_options_callback"></a></h4>
44060 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44078 the path passed to the callback. If the <code>encoding</code> is set to <code>'buffer'</code>,
44079 the path returned will be passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a> object.</p>
44122 <h4><code>fs.rmdir(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsrmdirpath-options-callback" id="all_fs_fsrmdirpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_rmdir_path_options_callback"></a></h4>
44130 <td><p>Using <code>fs.rmdir(path, { recursive: true })</code> on a <code>path</code> that is a file is no longer permitted and results in an <code>ENOENT</code> error on Windows and an <code>ENOTDIR</code> error on POSIX.</p></td></tr>
44132 <td><p>Using <code>fs.rmdir(path, { recursive: true })</code> on a <code>path</code> that does not exist is no longer permitted and results in a <code>ENOENT</code> error.</p></td></tr>
44144 <td><p>The <code>path</code> parameters can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
44153 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44181 <h4><code>fs.rm(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsrmpath-options-callback" id="all_fs_fsrmpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_rm_path_options_callback"></a></h4>
44187 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
44194 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44197 <li><code>force</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, exceptions will be ignored if <code>path</code> does
44220 <h4><code>fs.stat(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsstatpath-options-callback" id="all_fs_fsstatpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_stat_path_options_callback"></a></h4>
44232 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
44241 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44324 <h4><code>fs.statfs(path[, options], callback)</code><span><a class="mark" href="#all_fs_fsstatfspath-options-callback" id="all_fs_fsstatfspath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_statfs_path_options_callback"></a></h4>
44329 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44344 contains <code>path</code>. The callback gets two arguments <code>(err, stats)</code> where <code>stats</code>
44347 <h4><code>fs.symlink(target, path[, type], callback)</code><span><a class="mark" href="#all_fs_fssymlinktarget-path-type-callback" id="all_fs_fssymlinktarget-path-type-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_symlink_target_path_type_callback"></a></h4>
44357 <td><p>The <code>target</code> and <code>path</code> parameters can be WHATWG <code>URL</code> objects using <code>file:</code> protocol. Support is currently still <em>experimental</em>.</p></td></tr>
44365 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44373 <p>Creates the link called <code>path</code> pointing to <code>target</code>. No arguments other than a
44380 require the destination path to be absolute. When using <code>'junction'</code>, the
44381 <code>target</code> argument will automatically be normalized to absolute path. Junction
44393 <h4><code>fs.truncate(path[, len], callback)</code><span><a class="mark" href="#all_fs_fstruncatepath-len-callback" id="all_fs_fstruncatepath-len-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_truncate_path_len_callback"></a></h4>
44412 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44425 <span class="hljs-comment">// Assuming that 'path/file.txt' is a regular file.</span>
44426 <span class="hljs-title function_">truncate</span>(<span class="hljs-string">'path/file.txt'</span>, <span class="hljs-function">(<span class="hljs-params">err</span>) =></span> {
44428 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'path/file.txt was truncated'</span>);
44430 <span class="hljs-comment">// Assuming that 'path/file.txt' is a regular file.</span>
44431 <span class="hljs-title function_">truncate</span>(<span class="hljs-string">'path/file.txt'</span>, <span class="hljs-function">(<span class="hljs-params">err</span>) =></span> {
44433 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'path/file.txt was truncated'</span>);
44438 <h4><code>fs.unlink(path, callback)</code><span><a class="mark" href="#all_fs_fsunlinkpath-callback" id="all_fs_fsunlinkpath-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_unlink_path_callback"></a></h4>
44448 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
44457 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44467 <span class="hljs-comment">// Assuming that 'path/file.txt' is a regular file.</span>
44468 <span class="hljs-title function_">unlink</span>(<span class="hljs-string">'path/file.txt'</span>, <span class="hljs-function">(<span class="hljs-params">err</span>) =></span> {
44470 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'path/file.txt was deleted'</span>);
44492 <h4><code>fs.utimes(path, atime, mtime, callback)</code><span><a class="mark" href="#all_fs_fsutimespath-atime-mtime-callback" id="all_fs_fsutimespath-atime-mtime-callback">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_utimes_path_atime_mtime_callback"></a></h4>
44504 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
44515 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
44524 <p>Change the file system timestamps of the object referenced by <code>path</code>.</p>
44617 <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
44618 watches the inode. If the watched path is deleted and recreated, it is assigned
44997 <h4><code>fs.accessSync(path[, mode])</code><span><a class="mark" href="#all_fs_fsaccesssyncpath-mode" id="all_fs_fsaccesssyncpath-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_accesssync_path_mode"></a></h4>
45003 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45010 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45014 by <code>path</code>. The <code>mode</code> argument is an optional integer that specifies the
45030 <h4><code>fs.appendFileSync(path, data[, options])</code><span><a class="mark" href="#all_fs_fsappendfilesyncpath-data-options" id="all_fs_fsappendfilesyncpath-data-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_appendfilesync_path_data_options"></a></h4>
45045 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><number></a> filename or file descriptor</li>
45071 <p>The <code>path</code> may be specified as a numeric file descriptor that has been opened
45087 <h4><code>fs.chmodSync(path, mode)</code><span><a class="mark" href="#all_fs_fschmodsyncpath-mode" id="all_fs_fschmodsyncpath-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_chmodsync_path_mode"></a></h4>
45093 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45100 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45106 <h4><code>fs.chownSync(path, uid, gid)</code><span><a class="mark" href="#all_fs_fschownsyncpath-uid-gid" id="all_fs_fschownsyncpath-uid-gid">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_chownsync_path_uid_gid"></a></h4>
45112 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45119 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45188 <td><p>Accepts an additional <code>verbatimSymlinks</code> option to specify whether to perform path resolution for symlinks.</p></td></tr>
45196 <li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> source path to copy.</li>
45197 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> destination path to copy to.</li>
45207 <li><code>src</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> source path to copy.</li>
45208 <li><code>dest</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> destination path to copy to.</li>
45221 <li><code>verbatimSymlinks</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, path resolution for symlinks will
45230 <h4><code>fs.existsSync(path)</code><span><a class="mark" href="#all_fs_fsexistssyncpath" id="all_fs_fsexistssyncpath">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_existssync_path"></a></h4>
45236 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45243 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45246 <p>Returns <code>true</code> if the path exists, <code>false</code> otherwise.</p>
45255 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'The path exists.'</span>);</code> <button class="copy-button">copy</button></pre>
45350 <h4><code>fs.lchmodSync(path, mode)</code><span><a class="mark" href="#all_fs_fslchmodsyncpath-mode" id="all_fs_fslchmodsyncpath-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lchmodsync_path_mode"></a></h4>
45355 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45361 <h4><code>fs.lchownSync(path, uid, gid)</code><span><a class="mark" href="#all_fs_fslchownsyncpath-uid-gid" id="all_fs_fslchownsyncpath-uid-gid">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lchownsync_path_uid_gid"></a></h4>
45374 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45378 <p>Set the owner for the path. Returns <code>undefined</code>.</p>
45380 <h4><code>fs.lutimesSync(path, atime, mtime)</code><span><a class="mark" href="#all_fs_fslutimessyncpath-atime-mtime" id="all_fs_fslutimessyncpath-atime-mtime">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lutimessync_path_atime_mtime"></a></h4>
45385 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45389 <p>Change the file system timestamps of the symbolic link referenced by <code>path</code>.
45410 <h4><code>fs.lstatSync(path[, options])</code><span><a class="mark" href="#all_fs_fslstatsyncpath-options" id="all_fs_fslstatsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_lstatsync_path_options"></a></h4>
45420 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45427 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45439 <p>Retrieves the <a href="#all_fs_class-fsstats" class="type"><fs.Stats></a> for the symbolic link referred to by <code>path</code>.</p>
45441 <h4><code>fs.mkdirSync(path[, options])</code><span><a class="mark" href="#all_fs_fsmkdirsyncpath-options" id="all_fs_fsmkdirsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_mkdirsync_path_options"></a></h4>
45447 <td><p>In <code>recursive</code> mode, the first created path is returned now.</p></td></tr>
45451 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45458 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45468 <code>true</code>, the first directory path created.
45494 <p>Returns the created directory path.</p>
45499 <h4><code>fs.opendirSync(path[, options])</code><span><a class="mark" href="#all_fs_fsopendirsyncpath-options" id="all_fs_fsopendirsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_opendirsync_path_options"></a></h4>
45514 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45529 <p>The <code>encoding</code> option sets the encoding for the <code>path</code> while opening the
45531 <h4><code>fs.openSync(path[, flags[, mode]])</code><span><a class="mark" href="#all_fs_fsopensyncpath-flags-mode" id="all_fs_fsopensyncpath-flags-mode">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_opensync_path_flags_mode"></a></h4>
45541 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45548 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45557 <h4><code>fs.readdirSync(path[, options])</code><span><a class="mark" href="#all_fs_fsreaddirsyncpath-options" id="all_fs_fsreaddirsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_readdirsync_path_options"></a></h4>
45567 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45574 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45592 <h4><code>fs.readFileSync(path[, options])</code><span><a class="mark" href="#all_fs_fsreadfilesyncpath-options" id="all_fs_fsreadfilesyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_readfilesync_path_options"></a></h4>
45598 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45600 <td><p>The <code>path</code> parameter can be a file descriptor now.</p></td></tr>
45607 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type"><integer></a> filename or file descriptor</li>
45616 <p>Returns the contents of the <code>path</code>.</p>
45621 <p>Similar to <a href="#all_fs_fsreadfilepath-options-callback"><code>fs.readFile()</code></a>, when the path is a directory, the behavior of
45631 <h4><code>fs.readlinkSync(path[, options])</code><span><a class="mark" href="#all_fs_fsreadlinksyncpath-options" id="all_fs_fsreadlinksyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_readlinksync_path_options"></a></h4>
45637 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45644 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45656 the link path returned. If the <code>encoding</code> is set to <code>'buffer'</code>,
45657 the link path returned will be passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a> object.</p>
45724 <h4><code>fs.realpathSync(path[, options])</code><span><a class="mark" href="#all_fs_fsrealpathsyncpath-options" id="all_fs_fsrealpathsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_realpathsync_path_options"></a></h4>
45732 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45743 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45754 <h4><code>fs.realpathSync.native(path[, options])</code><span><a class="mark" href="#all_fs_fsrealpathsyncnativepath-options" id="all_fs_fsrealpathsyncnativepath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_realpathsync_native_path_options"></a></h4>
45759 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45771 the path returned. If the <code>encoding</code> is set to <code>'buffer'</code>,
45772 the path returned will be passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a> object.</p>
45794 <h4><code>fs.rmdirSync(path[, options])</code><span><a class="mark" href="#all_fs_fsrmdirsyncpath-options" id="all_fs_fsrmdirsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_rmdirsync_path_options"></a></h4>
45800 <td><p>Using <code>fs.rmdirSync(path, { recursive: true })</code> on a <code>path</code> that is a file is no longer permitted and results in an <code>ENOENT</code> error on Windows and an <code>ENOTDIR</code> error on POSIX.</p></td></tr>
45802 <td><p>Using <code>fs.rmdirSync(path, { recursive: true })</code> on a <code>path</code> that does not exist is no longer permitted and results in a <code>ENOENT</code> error.</p></td></tr>
45812 <td><p>The <code>path</code> parameters can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45819 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45841 <h4><code>fs.rmSync(path[, options])</code><span><a class="mark" href="#all_fs_fsrmsyncpath-options" id="all_fs_fsrmsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_rmsync_path_options"></a></h4>
45847 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45854 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45857 <li><code>force</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type"><boolean></a> When <code>true</code>, exceptions will be ignored if <code>path</code> does
45874 <h4><code>fs.statSync(path[, options])</code><span><a class="mark" href="#all_fs_fsstatsyncpath-options" id="all_fs_fsstatsyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_statsync_path_options"></a></h4>
45884 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45891 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45903 <p>Retrieves the <a href="#all_fs_class-fsstats" class="type"><fs.Stats></a> for the path.</p>
45904 <h4><code>fs.statfsSync(path[, options])</code><span><a class="mark" href="#all_fs_fsstatfssyncpath-options" id="all_fs_fsstatfssyncpath-options">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_statfssync_path_options"></a></h4>
45909 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45919 contains <code>path</code>.</p>
45921 <h4><code>fs.symlinkSync(target, path[, type])</code><span><a class="mark" href="#all_fs_fssymlinksynctarget-path-type" id="all_fs_fssymlinksynctarget-path-type">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_symlinksync_target_path_type"></a></h4>
45929 <td><p>The <code>target</code> and <code>path</code> parameters can be WHATWG <code>URL</code> objects using <code>file:</code> protocol. Support is currently still <em>experimental</em>.</p></td></tr>
45937 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45942 this API: <a href="#all_fs_fssymlinktarget-path-type-callback"><code>fs.symlink()</code></a>.</p>
45943 <h4><code>fs.truncateSync(path[, len])</code><span><a class="mark" href="#all_fs_fstruncatesyncpath-len" id="all_fs_fstruncatesyncpath-len">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_truncatesync_path_len"></a></h4>
45948 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45955 <h4><code>fs.unlinkSync(path)</code><span><a class="mark" href="#all_fs_fsunlinksyncpath" id="all_fs_fsunlinksyncpath">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_unlinksync_path"></a></h4>
45961 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45968 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
45971 <h4><code>fs.utimesSync(path, atime, mtime)</code><span><a class="mark" href="#all_fs_fsutimessyncpath-atime-mtime" id="all_fs_fsutimessyncpath-atime-mtime">#</a></span><a aria-hidden="true" class="legacy" id="fs_fs_utimessync_path_atime_mtime"></a></h4>
45979 <td><p>The <code>path</code> parameter can be a WHATWG <code>URL</code> object using <code>file:</code> protocol.</p></td></tr>
45988 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
46174 <h5><code>dir.path</code><span><a class="mark" href="#all_fs_dirpath" id="all_fs_dirpath">#</a></span><a aria-hidden="true" class="legacy" id="fs_dir_path"></a></h5>
46181 <p>The read-only path of this directory as was provided to <a href="#all_fs_fsopendirpath-options-callback"><code>fs.opendir()</code></a>,
46334 <p>The path to the parent directory of the file this <a href="#all_fs_class-fsdirent" class="type"><fs.Dirent></a> object refers to.</p>
46335 <h5><code>dirent.path</code><span><a class="mark" href="#all_fs_direntpath" id="all_fs_direntpath">#</a></span><a aria-hidden="true" class="legacy" id="fs_dirent_path"></a></h5>
46343 <p>The base path that this <a href="#all_fs_class-fsdirent" class="type"><fs.Dirent></a> object refers to.</p>
46493 <h5><code>readStream.path</code><span><a class="mark" href="#all_fs_readstreampath" id="all_fs_readstreampath">#</a></span><a aria-hidden="true" class="legacy" id="fs_readstream_path"></a></h5>
46500 <p>The path to the file the stream is reading from as specified in the first
46501 argument to <code>fs.createReadStream()</code>. If <code>path</code> is passed as a string, then
46502 <code>readStream.path</code> will be a string. If <code>path</code> is passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a>, then
46503 <code>readStream.path</code> will be a <a href="#all_buffer_class-buffer" class="type"><Buffer></a>. If <code>fd</code> is specified, then
46504 <code>readStream.path</code> will be <code>undefined</code>.</p>
46601 about a symbolic link itself and not the path it resolves to.</p>
46966 <h5><code>writeStream.path</code><span><a class="mark" href="#all_fs_writestreampath" id="all_fs_writestreampath">#</a></span><a aria-hidden="true" class="legacy" id="fs_writestream_path"></a></h5>
46970 <p>The path to the file the stream is writing to as specified in the first
46971 argument to <a href="#all_fs_fscreatewritestreampath-options"><code>fs.createWriteStream()</code></a>. If <code>path</code> is passed as a string, then
46972 <code>writeStream.path</code> will be a string. If <code>path</code> is passed as a <a href="#all_buffer_class-buffer" class="type"><Buffer></a>, then
46973 <code>writeStream.path</code> will be a <a href="#all_buffer_class-buffer" class="type"><Buffer></a>.</p>
47006 <span class="hljs-title function_">open</span>(<span class="hljs-string">'/path/to/my/file'</span>, <span class="hljs-variable constant_">O_RDWR</span> | <span class="hljs-variable constant_">O_CREAT</span> | <span class="hljs-variable constant_">O_EXCL</span>, <span class="hljs-function">(<span class="hljs-params">err, fd</span>) =></span> {
47050 destination path already exists.</td>
47096 <td>Flag indicating that if path identifies a terminal device, opening the
47097 path shall not cause that terminal to become the controlling terminal for
47112 <td>Flag indicating that the open should fail if the path is not a
47123 <td>Flag indicating that the open should fail if the path is a symbolic
47329 <p>Example using an absolute path on POSIX:</p>
47339 <p>Example using a relative path on POSIX (relative to <code>process.cwd()</code>):</p>
47353 <p>For most <code>node:fs</code> module functions, the <code>path</code> or <code>filename</code> argument may be
47366 <span class="hljs-comment">// - WHATWG file URLs with hostname convert to UNC path</span>
47370 <span class="hljs-comment">// - WHATWG file URLs with drive letters convert to absolute path</span>
47377 <span class="hljs-comment">// TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute</span></code> <button class="copy-button">copy</button></pre>
47390 <span class="hljs-comment">// - WHATWG file URLs convert to absolute path</span>
47400 <span class="hljs-comment">/* TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must not include encoded
47406 <span class="hljs-comment">/* TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must not include encoded
47412 <span class="hljs-title function_">readFileSync</span>(<span class="hljs-keyword">new</span> <span class="hljs-title function_">URL</span>(<span class="hljs-string">'file:///C:/path/%5C'</span>));
47413 <span class="hljs-title function_">readFileSync</span>(<span class="hljs-keyword">new</span> <span class="hljs-title function_">URL</span>(<span class="hljs-string">'file:///C:/path/%5c'</span>));
47414 <span class="hljs-comment">/* TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must not include encoded
47419 systems, it is possible for a single file path to contain sub-sequences that
47422 <p>Example using an absolute path on POSIX:</p>
47435 behavior can be observed when using a drive path without a backslash. For
47509 <p><code>'ax'</code>: Like <code>'a'</code> but fails if the path exists.</p>
47516 <p><code>'ax+'</code>: Like <code>'a+'</code> but fails if the path exists.</p>
47553 <p><code>'wx'</code>: Like <code>'w'</code> but fails if the path exists.</p>
47560 <p><code>'wx+'</code>: Like <code>'w+'</code> but fails if the path exists.</p>
47568 return an error if the path already exists. On POSIX, if the path is a symbolic
47569 link, using <code>O_EXCL</code> returns an error even if the link is to a path that does
48302 <span class="hljs-attr">path</span>: <span class="hljs-string">'/'</span>,
48649 <span class="hljs-attr">path</span>: <span class="hljs-string">'www.google.com:80'</span>,
48700 <span class="hljs-attr">path</span>: <span class="hljs-string">'www.google.com:80'</span>,
48764 <span class="hljs-attr">path</span>: <span class="hljs-string">'/length_request'</span>,
48778 <span class="hljs-attr">path</span>: <span class="hljs-string">'/length_request'</span>,
49116 <h4><code>request.path</code><span><a class="mark" href="#all_http_requestpath" id="all_http_requestpath">#</a></span><a aria-hidden="true" class="legacy" id="http_request_path"></a></h4>
49121 <li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The request path.</li>
51208 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Request path. Should include query string if any.
51209 E.G. <code>'/index.html?page=12'</code>. An exception is thrown when the request path
51255 <span class="hljs-attr">path</span>: <span class="hljs-string">'/upload'</span>,
51290 <span class="hljs-attr">path</span>: <span class="hljs-string">'/upload'</span>,
51662 <span class="hljs-keyword">const</span> req = client.<span class="hljs-title function_">request</span>({ <span class="hljs-string">':path'</span>: <span class="hljs-string">'/'</span> });
51820 <span class="hljs-keyword">const</span> path = headers[<span class="hljs-string">':path'</span>];
52382 <p>The <code>:method</code> and <code>:path</code> pseudo-headers are not specified within <code>headers</code>,
52386 <li><code>:path</code> = <code>/</code></li>
52707 <span class="hljs-keyword">const</span> req = client.<span class="hljs-title function_">request</span>({ <span class="hljs-string">':path'</span>: <span class="hljs-string">'/'</span> });
52758 fields (e.g. <code>':method'</code>, <code>':path'</code>, etc).</p>
52820 <span class="hljs-keyword">const</span> req = client.<span class="hljs-title function_">request</span>({ <span class="hljs-string">':path'</span>: <span class="hljs-string">'/'</span> });
52903 stream.<span class="hljs-title function_">pushStream</span>({ <span class="hljs-string">':path'</span>: <span class="hljs-string">'/'</span> }, <span class="hljs-function">(<span class="hljs-params">err, pushStream, headers</span>) =></span> {
53053 <h5><code>http2stream.respondWithFile(path[, headers[, options]])</code><span><a class="mark" href="#all_http2_http2streamrespondwithfilepath-headers-options" id="all_http2_http2streamrespondwithfilepath-headers-options">#</a></span><a aria-hidden="true" class="legacy" id="http2_http2stream_respondwithfile_path_headers_options"></a></h5>
53068 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_buffer_class-buffer" class="type"><Buffer></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a></li>
53082 <p>Sends a regular file as the response. The <code>path</code> must specify a regular file
53093 <p>Example using a file path:</p>
53257 <span class="hljs-keyword">const</span> path = headers[<span class="hljs-title class_">HTTP2</span>_HEADER_PATH];
53447 <span class="hljs-keyword">const</span> path = headers[<span class="hljs-title class_">HTTP2</span>_HEADER_PATH];
53824 (user ID and password), path, querystring, and fragment details in the
54057 <li>Duplicates of <code>:status</code>, <code>:method</code>, <code>:authority</code>, <code>:scheme</code>, <code>:path</code>,
54074 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(headers[<span class="hljs-string">':path'</span>]);
54191 <span class="hljs-keyword">const</span> req = client.<span class="hljs-title function_">request</span>({ <span class="hljs-string">':path'</span>: <span class="hljs-string">'/'</span> });</code> <button class="copy-button">copy</button></pre>
54237 <span class="hljs-comment">// Must not specify the ':path' and ':scheme' headers</span>
54418 <p>In HTTP/2, the request path, host name, protocol, and method are represented as
54419 special headers prefixed with the <code>:</code> character (e.g. <code>':path'</code>). These special
54424 <span class="hljs-title function_">assert</span>(request.<span class="hljs-property">url</span>); <span class="hljs-comment">// Fails because the :path header has been removed</span></code> <button class="copy-button">copy</button></pre>
55373 <span class="hljs-attr">path</span>: <span class="hljs-string">'/'</span>,
55394 <span class="hljs-attr">path</span>: <span class="hljs-string">'/'</span>,
55408 <span class="hljs-attr">path</span>: <span class="hljs-string">'/'</span>,
55436 <span class="hljs-attr">path</span>: <span class="hljs-string">'/'</span>,
55931 the data file will be available at <code>./node_modules/full-icu</code>. This path can be
56091 relative, and based on the real path of the files making the calls to
56106 <pre>require(X) from module at path Y
56152 1. let PARTS = path split(START)
56157 b. DIR = path join(PARTS[0 .. I] + "node_modules")
56297 <p>A required module prefixed with <code>'/'</code> is an absolute path to the file. For
56305 <p>If the given path does not exist, <code>require()</code> will throw a
56342 Node.js will not append <code>node_modules</code> to a path already ending in
56358 module by including a path suffix after the module name. For instance
56359 <code>require('example-module/path/to/file')</code> would resolve <code>path/to/file</code>
56360 relative to where <code>example-module</code> is located. The suffixed path follows the
56404 module's absolute filename and directory path.</li>
56418 <a href="#all_path_pathdirnamepath"><code>path.dirname()</code></a> of the <a href="#all_modules___filename"><code>__filename</code></a>.</p>
56422 <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(path.<span class="hljs-title function_">dirname</span>(__filename));
56433 path with symlinks resolved.</p>
56480 <li><code>id</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> module name or path</li>
56485 a relative path (e.g. <code>./</code>, <code>./foo</code>, <code>./bar/baz</code>, <code>../foo</code>) that will be
56490 <pre><code class="language-js"><span class="hljs-comment">// Importing a local module with a path relative to the `__dirname` or current</span>
56491 <span class="hljs-comment">// working directory. (On Windows, this would resolve to .\path\myLocalModule.)</span>
56492 <span class="hljs-keyword">const</span> myLocalModule = <span class="hljs-built_in">require</span>(<span class="hljs-string">'./path/myLocalModule'</span>);
56495 <span class="hljs-keyword">const</span> jsonData = <span class="hljs-built_in">require</span>(<span class="hljs-string">'./path/filename.json'</span>);
56557 <span class="hljs-attr">path</span>: <span class="hljs-string">'/absolute/path/to'</span>,
56559 <span class="hljs-attr">filename</span>: <span class="hljs-string">'/absolute/path/to/entry.js'</span>,
56563 [ <span class="hljs-string">'/absolute/path/to/node_modules'</span>,
56564 <span class="hljs-string">'/absolute/path/node_modules'</span>,
56580 <li><code>request</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The module path to resolve.</li>
56601 <li><code>request</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The module path whose lookup paths are being retrieved.</li>
56743 <h4><code>module.path</code><span><a class="mark" href="#all_modules_modulepath" id="all_modules_modulepath">#</a></span><a aria-hidden="true" class="legacy" id="modules_module_path"></a></h4>
56751 <a href="#all_path_pathdirnamepath"><code>path.dirname()</code></a> of the <a href="#all_modules_moduleid"><code>module.id</code></a>.</p>
56788 <li><a id="modules_module_findsourcemap_path_error" href="module.html#modulefindsourcemappath"><code>module.findSourceMap(path)</code></a></li>
56871 e.g. <code>'node:path'</code> in <code>import { sep } from 'node:path'</code>. Specifiers are also
56878 to a path relative to the location of the importing file. <em>The file extension
56890 directly and explicitly to a full path.</p>
56898 path to the package name unless the package's <a href="#all_packages_nodejs-packagejson-field-definitions"><code>package.json</code></a> contains an
56921 differences between <a href="https://url.spec.whatwg.org/">URL</a> and path resolution (such as percent encoding
56922 details), it is recommended to use <a href="#all_url_urlpathtofileurlpath">url.pathToFileURL</a> when importing a path.</p>
57195 imported from the same path.</p>
57340 <li><em>Package Path Not Exported</em>: Package exports do not define or permit a target
57344 <li><em>Unsupported Directory Import</em>: The resolved path corresponds to a directory,
57397 <li>Set <em>resolved</em> to the real path of <em>resolved</em>, maintaining the
57556 <li>Throw a <em>Package Path Not Exported</em> error.</li>
57783 <li>If <em>scopeURL</em> ends in a <em>"node_modules"</em> path segment, return <strong>null</strong>.</li>
57826 requires the full path to a module be provided to the loader. To enable the
57872 function. Must be a file URL object, file URL string, or absolute path
58143 <pre><code class="language-js mjs"><span class="hljs-comment">// path-to-my-hooks.js</span>
58163 <span class="hljs-title function_">register</span>(<span class="hljs-string">'./path-to-my-hooks.js'</span>, {
58181 <span class="hljs-title function_">register</span>(<span class="hljs-string">'./path-to-my-hooks.js'</span>, {
58525 <span class="hljs-keyword">import</span> { dirname, extname, resolve <span class="hljs-keyword">as</span> resolvePath } <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
58558 <span class="hljs-comment">// `url` is only a file path during the first iteration when passed the</span>
58560 <span class="hljs-comment">// an actual file path from load() will contain a file extension as it's</span>
58566 <span class="hljs-comment">// If it is a file path, get the directory it's in</span>
58570 <span class="hljs-comment">// Compose a file path to a package.json in the same directory,</span>
58648 <h4><code>module.findSourceMap(path)</code><span><a class="mark" href="#all_module_modulefindsourcemappath" id="all_module_modulefindsourcemappath">#</a></span><a aria-hidden="true" class="legacy" id="module_module_findsourcemap_path"></a></h4>
58653 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
58657 <p><code>path</code> is the resolved path for the file for which a corresponding source map
58926 <pre><code class="language-bash">node --input-type=module --<span class="hljs-built_in">eval</span> <span class="hljs-string">"import { sep } from 'node:path'; console.log(sep);"</span>
58928 <span class="hljs-built_in">echo</span> <span class="hljs-string">"import { sep } from 'node:path'; console.log(sep);"</span> | node --input-type=module</code> <button class="copy-button">copy</button></pre>
59025 <code>require('/path/to/node_modules/pkg/subpath.js')</code> will still load <code>subpath.js</code>.</p>
59060 benefits of readability and of masking the true path of the file within the
59067 export. This also mirrors the requirement of using <a href="#all_esm_mandatory-file-extensions">the full specifier path</a>
59398 created by <code>import pkgInstance from 'pkg'</code> (or an alternative main path like
59638 via a <code>node_modules</code> lookup. Its value is a path.</p>
59643 <pre><code class="language-js cjs"><span class="hljs-comment">// This resolves to ./path/to/directory/index.js.</span>
59644 <span class="hljs-built_in">require</span>(<span class="hljs-string">'./path/to/directory'</span>);</code> <button class="copy-button">copy</button></pre>
59776 <a href="#all_net_socketconnect"><code>socket.connect()</code></a> take a <code>path</code> parameter to identify IPC endpoints.</p>
59777 <p>On Unix, the local domain is also known as the Unix domain. The path is a
59788 <p>On Windows, the local domain is implemented using a named pipe. The path <em>must</em>
59798 path.<span class="hljs-title function_">join</span>(<span class="hljs-string">'\\\\?\\pipe'</span>, process.<span class="hljs-title function_">cwd</span>(), <span class="hljs-string">'myctl'</span>));</code> <button class="copy-button">copy</button></pre>
60061 <li><a href="#all_net_serverlistenpath-backlog-callback"><code>server.listen(path[, backlog][, callback])</code></a>
60080 <code>port</code>/<code>path</code>/<code>handle</code>. One way to handle this would be to retry
60126 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Will be ignored if <code>port</code> is specified. See
60147 Otherwise, if <code>path</code> is specified, it behaves the same as
60148 <a href="#all_net_serverlistenpath-backlog-callback"><code>server.listen(path[, backlog][, callback])</code></a>.
60163 <p>Starting an IPC server as root may cause the server path to be inaccessible for
60176 <h5><code>server.listen(path[, backlog][, callback])</code><span><a class="mark" href="#all_net_serverlistenpath-backlog-callback" id="all_net_serverlistenpath-backlog-callback">#</a></span><a aria-hidden="true" class="legacy" id="net_server_listen_path_backlog_callback"></a></h5>
60181 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Path the server should listen to. See
60187 <p>Start an <a href="#all_net_ipc-support">IPC</a> server listening for connections on the given <code>path</code>.</p>
60457 <li><a href="#all_net_socketconnectpath-connectlistener"><code>socket.connect(path[, connectListener])</code></a>
60540 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Required. Path the client should connect to.
60576 <h5><code>socket.connect(path[, connectListener])</code><span><a class="mark" href="#all_net_socketconnectpath-connectlistener" id="all_net_socketconnectpath-connectlistener">#</a></span><a aria-hidden="true" class="legacy" id="net_socket_connect_path_connectlistener"></a></h5>
60578 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Path the client should connect to. See
60587 called with <code>{ path: path }</code> as <code>options</code>.</p>
60894 <li><a href="#all_net_netconnectpath-connectlistener"><code>net.connect(path[, connectListener])</code></a> for <a href="#all_net_ipc-support">IPC</a>
60910 <h4><code>net.connect(path[, connectListener])</code><span><a class="mark" href="#all_net_netconnectpath-connectlistener" id="all_net_netconnectpath-connectlistener">#</a></span><a aria-hidden="true" class="legacy" id="net_net_connect_path_connectlistener"></a></h4>
60915 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
60920 <a href="#all_net_netcreateconnectionpath-connectlistener"><code>net.createConnection(path[, connectListener])</code></a>.</p>
60943 <li><a href="#all_net_netcreateconnectionpath-connectlistener"><code>net.createConnection(path[, connectListener])</code></a>
60988 <pre><code class="language-js"><span class="hljs-keyword">const</span> client = net.<span class="hljs-title function_">createConnection</span>({ <span class="hljs-attr">path</span>: <span class="hljs-string">'/tmp/echo.sock'</span> });</code> <button class="copy-button">copy</button></pre>
60989 <h4><code>net.createConnection(path[, connectListener])</code><span><a class="mark" href="#all_net_netcreateconnectionpath-connectlistener" id="all_net_netcreateconnectionpath-connectlistener">#</a></span><a aria-hidden="true" class="legacy" id="net_net_createconnection_path_connectlistener"></a></h4>
60994 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Path the socket should connect to. Will be passed to
60995 <a href="#all_net_socketconnectpath-connectlistener"><code>socket.connect(path[, connectListener])</code></a>.
61000 <a href="#all_net_socketconnectpath-connectlistener"><code>socket.connect(path[, connectListener])</code></a>.</li>
61006 <a href="#all_net_socketconnectpath-connectlistener"><code>socket.connect(path[, connectListener])</code></a>,
61322 <p>The platform-specific file path of the null device.</p>
61363 <p>Returns the string path of the current user's home directory.</p>
61367 Otherwise it uses the path to the profile directory of the current user.</p>
61528 <td><p>This function is now cross-platform consistent and no longer returns a path with a trailing slash on any platform.</p></td></tr>
61916 <td>Indicates that the path is a directory.</td>
61920 <td>Indicates too many levels of symbolic links in a path.</td>
62021 <td>Indicates that the path is not a directory.</td>
62454 <section><h2>Path<span><a class="mark" href="#all_path_path" id="all_path_path">#</a></span><a aria-hidden="true" class="legacy" id="path_path"></a></h2>
62457 <p><strong>Source Code:</strong> <a href="https://github.com/nodejs/node/blob/v18.20.1/lib/path.js">lib/path.js</a></p>
62458 <p>The <code>node:path</code> module provides utilities for working with file and directory
62460 <pre><code class="language-js"><span class="hljs-keyword">const</span> path = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);</code> <button class="copy-button">copy</button></pre>
62462 <p>The default operation of the <code>node:path</code> module varies based on the operating
62464 a Windows operating system, the <code>node:path</code> module will assume that
62466 <p>So using <code>path.basename()</code> might yield different results on POSIX and Windows:</p>
62468 <pre><code class="language-js">path.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'C:\\temp\\myfile.html'</span>);
62471 <pre><code class="language-js">path.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'C:\\temp\\myfile.html'</span>);
62474 operating system, use <a href="#all_path_pathwin32"><code>path.win32</code></a>:</p>
62476 <pre><code class="language-js">path.<span class="hljs-property">win32</span>.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'C:\\temp\\myfile.html'</span>);
62479 operating system, use <a href="#all_path_pathposix"><code>path.posix</code></a>:</p>
62481 <pre><code class="language-js">path.<span class="hljs-property">posix</span>.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'/tmp/myfile.html'</span>);
62484 This behavior can be observed when using a drive path without a backslash. For
62485 example, <code>path.resolve('C:\\')</code> can potentially return a different result than
62486 <code>path.resolve('C:')</code>. For more information, see
62488 </section><section><h3><code>path.basename(path[, suffix])</code><span><a class="mark" href="#all_path_pathbasenamepath-suffix" id="all_path_pathbasenamepath-suffix">#</a></span><a aria-hidden="true" class="legacy" id="path_path_basename_path_suffix"></a></h3>
62494 <td><p>Passing a non-string as the <code>path</code> argument will throw now.</p></td></tr>
62501 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62505 <p>The <code>path.basename()</code> method returns the last portion of a <code>path</code>, similar to
62508 <pre><code class="language-js">path.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'/foo/bar/baz/asdf/quux.html'</span>);
62511 path.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'/foo/bar/baz/asdf/quux.html'</span>, <span class="hljs-string">'.html'</span>);
62517 <pre><code class="language-js">path.<span class="hljs-property">win32</span>.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'C:\\foo.html'</span>, <span class="hljs-string">'.html'</span>);
62520 path.<span class="hljs-property">win32</span>.<span class="hljs-title function_">basename</span>(<span class="hljs-string">'C:\\foo.HTML'</span>, <span class="hljs-string">'.html'</span>);
62522 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string or if <code>suffix</code> is given
62524 </section><section><h3><code>path.delimiter</code><span><a class="mark" href="#all_path_pathdelimiter" id="all_path_pathdelimiter">#</a></span><a aria-hidden="true" class="legacy" id="path_path_delimiter"></a></h3>
62531 <p>Provides the platform-specific path delimiter:</p>
62537 <pre><code class="language-js"><span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(process.<span class="hljs-property">env</span>.<span class="hljs-property">PATH</span>);
62540 process.<span class="hljs-property">env</span>.<span class="hljs-property">PATH</span>.<span class="hljs-title function_">split</span>(path.<span class="hljs-property">delimiter</span>);
62543 <pre><code class="language-js"><span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(process.<span class="hljs-property">env</span>.<span class="hljs-property">PATH</span>);
62546 process.<span class="hljs-property">env</span>.<span class="hljs-property">PATH</span>.<span class="hljs-title function_">split</span>(path.<span class="hljs-property">delimiter</span>);
62548 </section><section><h3><code>path.dirname(path)</code><span><a class="mark" href="#all_path_pathdirnamepath" id="all_path_pathdirnamepath">#</a></span><a aria-hidden="true" class="legacy" id="path_path_dirname_path"></a></h3>
62554 <td><p>Passing a non-string as the <code>path</code> argument will throw now.</p></td></tr>
62561 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62564 <p>The <code>path.dirname()</code> method returns the directory name of a <code>path</code>, similar to
62566 <a href="#all_path_pathsep"><code>path.sep</code></a>.</p>
62567 <pre><code class="language-js">path.<span class="hljs-title function_">dirname</span>(<span class="hljs-string">'/foo/bar/baz/asdf/quux'</span>);
62569 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>
62570 </section><section><h3><code>path.extname(path)</code><span><a class="mark" href="#all_path_pathextnamepath" id="all_path_pathextnamepath">#</a></span><a aria-hidden="true" class="legacy" id="path_path_extname_path"></a></h3>
62576 <td><p>Passing a non-string as the <code>path</code> argument will throw now.</p></td></tr>
62583 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62586 <p>The <code>path.extname()</code> method returns the extension of the <code>path</code>, from the last
62588 the <code>path</code>. If there is no <code>.</code> in the last portion of the <code>path</code>, or if
62590 the basename of <code>path</code> (see <code>path.basename()</code>) , an empty string is returned.</p>
62591 <pre><code class="language-js">path.<span class="hljs-title function_">extname</span>(<span class="hljs-string">'index.html'</span>);
62594 path.<span class="hljs-title function_">extname</span>(<span class="hljs-string">'index.coffee.md'</span>);
62597 path.<span class="hljs-title function_">extname</span>(<span class="hljs-string">'index.'</span>);
62600 path.<span class="hljs-title function_">extname</span>(<span class="hljs-string">'index'</span>);
62603 path.<span class="hljs-title function_">extname</span>(<span class="hljs-string">'.index'</span>);
62606 path.<span class="hljs-title function_">extname</span>(<span class="hljs-string">'.index.md'</span>);
62608 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>
62609 </section><section><h3><code>path.format(pathObject)</code><span><a class="mark" href="#all_path_pathformatpathobject" id="all_path_pathformatpathobject">#</a></span><a aria-hidden="true" class="legacy" id="path_path_format_pathobject"></a></h3>
62625 <p>The <code>path.format()</code> method returns a path string from an object. This is the
62626 opposite of <a href="#all_path_pathparsepath"><code>path.parse()</code></a>.</p>
62635 <span class="hljs-comment">// `${dir}${path.sep}${base}`</span>
62637 path.<span class="hljs-title function_">format</span>({
62647 path.<span class="hljs-title function_">format</span>({
62655 path.<span class="hljs-title function_">format</span>({
62662 <pre><code class="language-js">path.<span class="hljs-title function_">format</span>({
62663 <span class="hljs-attr">dir</span>: <span class="hljs-string">'C:\\path\\dir'</span>,
62666 <span class="hljs-comment">// Returns: 'C:\\path\\dir\\file.txt'</span></code> <button class="copy-button">copy</button></pre>
62667 </section><section><h3><code>path.isAbsolute(path)</code><span><a class="mark" href="#all_path_pathisabsolutepath" id="all_path_pathisabsolutepath">#</a></span><a aria-hidden="true" class="legacy" id="path_path_isabsolute_path"></a></h3>
62672 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62675 <p>The <code>path.isAbsolute()</code> method determines if <code>path</code> is an absolute path.</p>
62676 <p>If the given <code>path</code> is a zero-length string, <code>false</code> will be returned.</p>
62678 <pre><code class="language-js">path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'/foo/bar'</span>); <span class="hljs-comment">// true</span>
62679 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'/baz/..'</span>); <span class="hljs-comment">// true</span>
62680 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'qux/'</span>); <span class="hljs-comment">// false</span>
62681 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'.'</span>); <span class="hljs-comment">// false</span></code> <button class="copy-button">copy</button></pre>
62683 <pre><code class="language-js">path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'//server'</span>); <span class="hljs-comment">// true</span>
62684 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'\\\\server'</span>); <span class="hljs-comment">// true</span>
62685 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'C:/foo/..'</span>); <span class="hljs-comment">// true</span>
62686 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'C:\\foo\\..'</span>); <span class="hljs-comment">// true</span>
62687 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'bar\\baz'</span>); <span class="hljs-comment">// false</span>
62688 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'bar/baz'</span>); <span class="hljs-comment">// false</span>
62689 path.<span class="hljs-title function_">isAbsolute</span>(<span class="hljs-string">'.'</span>); <span class="hljs-comment">// false</span></code> <button class="copy-button">copy</button></pre>
62690 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>
62691 </section><section><h3><code>path.join([...paths])</code><span><a class="mark" href="#all_path_pathjoinpaths" id="all_path_pathjoinpaths">#</a></span><a aria-hidden="true" class="legacy" id="path_path_join_paths"></a></h3>
62696 <li><code>...paths</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A sequence of path segments</li>
62699 <p>The <code>path.join()</code> method joins all given <code>path</code> segments together using the
62700 platform-specific separator as a delimiter, then normalizes the resulting path.</p>
62701 <p>Zero-length <code>path</code> segments are ignored. If the joined path string is a
62704 <pre><code class="language-js">path.<span class="hljs-title function_">join</span>(<span class="hljs-string">'/foo'</span>, <span class="hljs-string">'bar'</span>, <span class="hljs-string">'baz/asdf'</span>, <span class="hljs-string">'quux'</span>, <span class="hljs-string">'..'</span>);
62707 path.<span class="hljs-title function_">join</span>(<span class="hljs-string">'foo'</span>, {}, <span class="hljs-string">'bar'</span>);
62708 <span class="hljs-comment">// Throws 'TypeError: Path must be a string. Received {}'</span></code> <button class="copy-button">copy</button></pre>
62709 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if any of the path segments is not a string.</p>
62710 </section><section><h3><code>path.normalize(path)</code><span><a class="mark" href="#all_path_pathnormalizepath" id="all_path_pathnormalizepath">#</a></span><a aria-hidden="true" class="legacy" id="path_path_normalize_path"></a></h3>
62715 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62718 <p>The <code>path.normalize()</code> method normalizes the given <code>path</code>, resolving <code>'..'</code> and
62720 <p>When multiple, sequential path segment separation characters are found (e.g.
62722 instance of the platform-specific path segment separator (<code>/</code> on POSIX and
62724 <p>If the <code>path</code> is a zero-length string, <code>'.'</code> is returned, representing the
62727 <pre><code class="language-js">path.<span class="hljs-title function_">normalize</span>(<span class="hljs-string">'/foo/bar//baz/asdf/quux/..'</span>);
62730 <pre><code class="language-js">path.<span class="hljs-title function_">normalize</span>(<span class="hljs-string">'C:\\temp\\\\foo\\bar\\..\\'</span>);
62732 <p>Since Windows recognizes multiple path separators, both separators will be
62734 <pre><code class="language-js">path.<span class="hljs-property">win32</span>.<span class="hljs-title function_">normalize</span>(<span class="hljs-string">'C:////temp\\\\/\\/\\/foo/bar'</span>);
62736 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>
62737 </section><section><h3><code>path.parse(path)</code><span><a class="mark" href="#all_path_pathparsepath" id="all_path_pathparsepath">#</a></span><a aria-hidden="true" class="legacy" id="path_path_parse_path"></a></h3>
62742 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62745 <p>The <code>path.parse()</code> method returns an object whose properties represent
62746 significant elements of the <code>path</code>. Trailing directory separators are ignored,
62747 see <a href="#all_path_pathsep"><code>path.sep</code></a>.</p>
62757 <pre><code class="language-js">path.<span class="hljs-title function_">parse</span>(<span class="hljs-string">'/home/user/dir/file.txt'</span>);
62772 <pre><code class="language-js">path.<span class="hljs-title function_">parse</span>(<span class="hljs-string">'C:\\path\\dir\\file.txt'</span>);
62775 <span class="hljs-comment">// dir: 'C:\\path\\dir',</span>
62783 " C:\ path\dir \ file .txt "
62786 <p>A <a href="#all_errors_class-typeerror"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>
62787 </section><section><h3><code>path.posix</code><span><a class="mark" href="#all_path_pathposix" id="all_path_pathposix">#</a></span><a aria-hidden="true" class="legacy" id="path_path_posix"></a></h3>
62793 <td><p>Exposed as <code>require('path/posix')</code>.</p></td></tr>
62802 <p>The <code>path.posix</code> property provides access to POSIX specific implementations
62803 of the <code>path</code> methods.</p>
62804 <p>The API is accessible via <code>require('node:path').posix</code> or <code>require('node:path/posix')</code>.</p>
62805 </section><section><h3><code>path.relative(from, to)</code><span><a class="mark" href="#all_path_pathrelativefrom-to" id="all_path_pathrelativefrom-to">#</a></span><a aria-hidden="true" class="legacy" id="path_path_relative_from_to"></a></h3>
62822 <p>The <code>path.relative()</code> method returns the relative path from <code>from</code> to <code>to</code> based
62824 path (after calling <code>path.resolve()</code> on each), a zero-length string is returned.</p>
62828 <pre><code class="language-js">path.<span class="hljs-title function_">relative</span>(<span class="hljs-string">'/data/orandea/test/aaa'</span>, <span class="hljs-string">'/data/orandea/impl/bbb'</span>);
62831 <pre><code class="language-js">path.<span class="hljs-title function_">relative</span>(<span class="hljs-string">'C:\\orandea\\test\\aaa'</span>, <span class="hljs-string">'C:\\orandea\\impl\\bbb'</span>);
62834 </section><section><h3><code>path.resolve([...paths])</code><span><a class="mark" href="#all_path_pathresolvepaths" id="all_path_pathresolvepaths">#</a></span><a aria-hidden="true" class="legacy" id="path_path_resolve_paths"></a></h3>
62839 <li><code>...paths</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> A sequence of paths or path segments</li>
62842 <p>The <code>path.resolve()</code> method resolves a sequence of paths or path segments into
62843 an absolute path.</p>
62845 subsequent <code>path</code> prepended until an absolute path is constructed.
62846 For instance, given the sequence of path segments: <code>/foo</code>, <code>/bar</code>, <code>baz</code>,
62847 calling <code>path.resolve('/foo', '/bar', 'baz')</code> would return <code>/bar/baz</code>
62848 because <code>'baz'</code> is not an absolute path but <code>'/bar' + '/' + 'baz'</code> is.</p>
62849 <p>If, after processing all given <code>path</code> segments, an absolute path has not yet
62851 <p>The resulting path is normalized and trailing slashes are removed unless the
62852 path is resolved to the root directory.</p>
62853 <p>Zero-length <code>path</code> segments are ignored.</p>
62854 <p>If no <code>path</code> segments are passed, <code>path.resolve()</code> will return the absolute path
62856 <pre><code class="language-js">path.<span class="hljs-title function_">resolve</span>(<span class="hljs-string">'/foo/bar'</span>, <span class="hljs-string">'./baz'</span>);
62859 path.<span class="hljs-title function_">resolve</span>(<span class="hljs-string">'/foo/bar'</span>, <span class="hljs-string">'/tmp/file/'</span>);
62862 path.<span class="hljs-title function_">resolve</span>(<span class="hljs-string">'wwwroot'</span>, <span class="hljs-string">'static_files/png/'</span>, <span class="hljs-string">'../gif/image.gif'</span>);
62866 </section><section><h3><code>path.sep</code><span><a class="mark" href="#all_path_pathsep" id="all_path_pathsep">#</a></span><a aria-hidden="true" class="legacy" id="path_path_sep"></a></h3>
62873 <p>Provides the platform-specific path segment separator:</p>
62879 <pre><code class="language-js"><span class="hljs-string">'foo/bar/baz'</span>.<span class="hljs-title function_">split</span>(path.<span class="hljs-property">sep</span>);
62882 <pre><code class="language-js"><span class="hljs-string">'foo\\bar\\baz'</span>.<span class="hljs-title function_">split</span>(path.<span class="hljs-property">sep</span>);
62885 as path segment separators; however, the <code>path</code> methods only add backward
62887 </section><section><h3><code>path.toNamespacedPath(path)</code><span><a class="mark" href="#all_path_pathtonamespacedpathpath" id="all_path_pathtonamespacedpathpath">#</a></span><a aria-hidden="true" class="legacy" id="path_path_tonamespacedpath_path"></a></h3>
62892 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a></li>
62895 <p>On Windows systems only, returns an equivalent <a href="https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#namespaces">namespace-prefixed path</a> for
62896 the given <code>path</code>. If <code>path</code> is not a string, <code>path</code> will be returned without
62899 method is non-operational and always returns <code>path</code> without modifications.</p>
62900 </section><section><h3><code>path.win32</code><span><a class="mark" href="#all_path_pathwin32" id="all_path_pathwin32">#</a></span><a aria-hidden="true" class="legacy" id="path_path_win32"></a></h3>
62906 <td><p>Exposed as <code>require('path/win32')</code>.</p></td></tr>
62915 <p>The <code>path.win32</code> property provides access to Windows-specific implementations
62916 of the <code>path</code> methods.</p>
62917 <p>The API is accessible via <code>require('node:path').win32</code> or <code>require('node:path/win32')</code>.</p></section>
64454 variables, are necessary to lock down that path of loading modules.</p>
64494 <p>Note, <code>blob:</code> URLs adopt their origin from the path they contain, and so a scope
65369 of <code>argv[0]</code> is needed. The second element will be the path to the JavaScript
65676 <span class="hljs-keyword">const</span> { join } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);
65896 <span class="hljs-attr">PATH</span>: <span class="hljs-string">'~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin'</span>,
67020 should be a relative path, that will be appended to the directory specified in
69546 <li><code>historyPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> the path to the history file</li>
69666 <li><code>NODE_REPL_HISTORY</code>: When a valid path is given, persistent REPL history
70067 <span class="hljs-attr">"PATH"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"/home/nodeuser/project/node:/opt/rh/devtoolset-3/root/usr/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"</span><span class="hljs-punctuation">,</span>
70197 process.<span class="hljs-title function_">chdir</span>(<span class="hljs-string">'/non-existent-path'</span>);
70205 process.<span class="hljs-title function_">chdir</span>(<span class="hljs-string">'/non-existent-path'</span>);
72627 <span class="hljs-keyword">import</span> { join } <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
72644 <span class="hljs-keyword">import</span> { join } <span class="hljs-keyword">from</span> <span class="hljs-string">'node:path'</span>;
75190 <p><a href="#all_cli_--test-reporter"><code>--test-reporter</code></a> can be used to specify a path to custom reporter.
75361 Destination can be <code>stdout</code>, <code>stderr</code>, or a file path.
75432 <span class="hljs-title function_">run</span>({ <span class="hljs-attr">files</span>: [path.<span class="hljs-title function_">resolve</span>(<span class="hljs-string">'./tests/test.js'</span>)] })
75436 <span class="hljs-title function_">run</span>({ <span class="hljs-attr">files</span>: [path.<span class="hljs-title function_">resolve</span>(<span class="hljs-string">'./tests/test.js'</span>)] })
76302 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The absolute path of the file.</li>
76331 began. This is useful for displaying relative path names in case the tests
76346 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76362 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76378 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76406 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76432 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76451 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76467 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type" class="type"><undefined></a> The path of the test file,
76485 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The path of the test file.</li>
76500 <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The path of the test file.</li>
77588 <li><code>'PATH_LENGTH_EXCEEDED'</code>: Path length constraint exceeded.</li>
78567 <p><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Creates Unix socket connection to path. If this option is
78574 If this option is specified, <code>path</code>, <code>host</code>, and <code>port</code> are ignored,
78715 </section><section><h3><code>tls.connect(path[, options][, callback])</code><span><a class="mark" href="#all_tls_tlsconnectpath-options-callback" id="all_tls_tlsconnectpath-options-callback">#</a></span><a aria-hidden="true" class="legacy" id="tls_tls_connect_path_options_callback"></a></h3>
78720 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Default value for <code>options.path</code>.</li>
78725 <p>Same as <a href="#all_tls_tlsconnectoptions-callback"><code>tls.connect()</code></a> except that <code>path</code> can be provided
78727 <p>A path option, if specified, will take precedence over the path argument.</p>
80531 │ protocol │ │ auth │ host │ path │ hash │
80754 <p>Gets and sets the path portion of the URL.</p>
81425 <li><code>url</code> <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The file URL string or URL object to convert to a path.</li>
81426 <li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The fully-resolved platform-specific Node.js file path.</li>
81429 well as ensuring a cross-platform valid absolute path string.</p>
81435 <span class="hljs-keyword">new</span> <span class="hljs-title function_">URL</span>(<span class="hljs-string">'file:///C:/path/'</span>).<span class="hljs-property">pathname</span>; <span class="hljs-comment">// Incorrect: /C:/path/</span>
81436 <span class="hljs-title function_">fileURLToPath</span>(<span class="hljs-string">'file:///C:/path/'</span>); <span class="hljs-comment">// Correct: C:\path\ (Windows)</span>
81446 <span class="hljs-keyword">new</span> <span class="hljs-title function_">URL</span>(<span class="hljs-string">'file:///C:/path/'</span>).<span class="hljs-property">pathname</span>; <span class="hljs-comment">// Incorrect: /C:/path/</span>
81447 <span class="hljs-title function_">fileURLToPath</span>(<span class="hljs-string">'file:///C:/path/'</span>); <span class="hljs-comment">// Correct: C:\path\ (Windows)</span>
81506 <h4><code>url.pathToFileURL(path)</code><span><a class="mark" href="#all_url_urlpathtofileurlpath" id="all_url_urlpathtofileurlpath">#</a></span><a aria-hidden="true" class="legacy" id="url_url_pathtofileurl_path"></a></h4>
81511 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The path to convert to a File URL.</li>
81514 <p>This function ensures that <code>path</code> is resolved absolutely, and that the URL
81522 <span class="hljs-keyword">new</span> <span class="hljs-title function_">URL</span>(<span class="hljs-string">'/some/path%.c'</span>, <span class="hljs-string">'file:'</span>); <span class="hljs-comment">// Incorrect: file:///some/path%.c</span>
81523 <span class="hljs-title function_">pathToFileURL</span>(<span class="hljs-string">'/some/path%.c'</span>); <span class="hljs-comment">// Correct: file:///some/path%25.c (POSIX)</span></code><code class="language-js cjs"><span class="hljs-keyword">const</span> { pathToFileURL } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:url'</span>);
81532 <span class="hljs-keyword">new</span> <span class="hljs-title function_">URL</span>(<span class="hljs-string">'/some/path%.c'</span>, <span class="hljs-string">'file:'</span>); <span class="hljs-comment">// Incorrect: file:///some/path%.c</span>
81533 <span class="hljs-title function_">pathToFileURL</span>(<span class="hljs-string">'/some/path%.c'</span>); <span class="hljs-comment">// Correct: file:///some/path%25.c (POSIX)</span></code><button class="copy-button">copy</button></pre>
81555 <li><code>pathname</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The path portion of the URL.</li>
81556 <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> Request path. Should include query string if any.
81557 E.G. <code>'/index.html?page=12'</code>. An exception is thrown when the request path
81581 path: '/?abc',
81596 path: '/?abc',
81653 <h5><code>urlObject.path</code><span><a class="mark" href="#all_url_urlobjectpath" id="all_url_urlobjectpath">#</a></span><a aria-hidden="true" class="legacy" id="url_urlobject_path"></a></h5>
81654 <p>The <code>path</code> property is a concatenation of the <code>pathname</code> and <code>search</code>
81657 <p>No decoding of the <code>path</code> is performed.</p>
81659 <p>The <code>pathname</code> property consists of the entire path section of the URL. This
81664 <p>No decoding of the path string is performed.</p>
81718 <span class="hljs-attr">pathname</span>: <span class="hljs-string">'/some/path'</span>,
81725 <span class="hljs-comment">// => 'https://example.com/some/path?page=1&format=json'</span></code> <button class="copy-button">copy</button></pre>
81808 <td><p>The <code>pathname</code> property on the returned URL object is now <code>/</code> when there is no path and the protocol scheme is <code>ws:</code> or <code>wss:</code>.</p></td></tr>
81913 <p>The <em>path percent-encode set</em> includes the <em>C0 control percent-encode set</em>
81918 <p>The <em>userinfo encode set</em> includes the <em>path percent-encode set</em> and code
81924 passwords encoded within the URL. The <em>path percent-encode set</em> is used for the
81925 path of most URLs. The <em>fragment percent-encode set</em> is used for URL fragments.
81926 The <em>C0 control percent-encode set</em> is used for host and path under certain
82187 event loop. Use this function with care and never in a hot code path.</p>
84899 <li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> The file path where the V8 heap snapshot is to be
85379 <span class="hljs-keyword">const</span> path = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);
85390 <span class="hljs-variable language_">this</span>.<span class="hljs-property">storage</span>.<span class="hljs-title function_">set</span>(book, fs.<span class="hljs-title function_">readFileSync</span>(path.<span class="hljs-title function_">join</span>(directory, book)));
85818 this string should omit the trailing slash, as that denotes a path.
86563 string should omit the trailing slash, as that denotes a path.
86821 this string should omit the trailing slash, as that denotes a path.
87068 <span class="hljs-string">'/sandbox'</span>: <span class="hljs-string">'/some/real/path/that/wasm/can/access'</span>,
87085 <span class="hljs-keyword">const</span> { join } = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node:path'</span>);
87091 <span class="hljs-string">'/sandbox'</span>: <span class="hljs-string">'/some/real/path/that/wasm/can/access'</span>,
87155 see as command-line arguments. The first argument is the virtual path to the
91555 <li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type"><string></a> | <a href="#all_url_the-whatwg-url-api" class="type"><URL></a> The path to the Worker's main script or module. Must
91556 be either an absolute path or a relative path (i.e. relative to the
91562 rather than a path.</li>
92006 <span class="hljs-attr">path</span>: <span class="hljs-string">'/'</span>,