11cb0ef41Sopenharmony_ci{
21cb0ef41Sopenharmony_ci  "type": "module",
31cb0ef41Sopenharmony_ci  "source": "doc/api/path.md",
41cb0ef41Sopenharmony_ci  "modules": [
51cb0ef41Sopenharmony_ci    {
61cb0ef41Sopenharmony_ci      "textRaw": "Path",
71cb0ef41Sopenharmony_ci      "name": "path",
81cb0ef41Sopenharmony_ci      "introduced_in": "v0.10.0",
91cb0ef41Sopenharmony_ci      "stability": 2,
101cb0ef41Sopenharmony_ci      "stabilityText": "Stable",
111cb0ef41Sopenharmony_ci      "desc": "<p><strong>Source Code:</strong> <a href=\"https://github.com/nodejs/node/blob/v18.20.1/lib/path.js\">lib/path.js</a></p>\n<p>The <code>node:path</code> module provides utilities for working with file and directory\npaths. It can be accessed using:</p>\n<pre><code class=\"language-js\">const path = require('node:path');\n</code></pre>",
121cb0ef41Sopenharmony_ci      "modules": [
131cb0ef41Sopenharmony_ci        {
141cb0ef41Sopenharmony_ci          "textRaw": "Windows vs. POSIX",
151cb0ef41Sopenharmony_ci          "name": "windows_vs._posix",
161cb0ef41Sopenharmony_ci          "desc": "<p>The default operation of the <code>node:path</code> module varies based on the operating\nsystem on which a Node.js application is running. Specifically, when running on\na Windows operating system, the <code>node:path</code> module will assume that\nWindows-style paths are being used.</p>\n<p>So using <code>path.basename()</code> might yield different results on POSIX and Windows:</p>\n<p>On POSIX:</p>\n<pre><code class=\"language-js\">path.basename('C:\\\\temp\\\\myfile.html');\n// Returns: 'C:\\\\temp\\\\myfile.html'\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">path.basename('C:\\\\temp\\\\myfile.html');\n// Returns: 'myfile.html'\n</code></pre>\n<p>To achieve consistent results when working with Windows file paths on any\noperating system, use <a href=\"#pathwin32\"><code>path.win32</code></a>:</p>\n<p>On POSIX and Windows:</p>\n<pre><code class=\"language-js\">path.win32.basename('C:\\\\temp\\\\myfile.html');\n// Returns: 'myfile.html'\n</code></pre>\n<p>To achieve consistent results when working with POSIX file paths on any\noperating system, use <a href=\"#pathposix\"><code>path.posix</code></a>:</p>\n<p>On POSIX and Windows:</p>\n<pre><code class=\"language-js\">path.posix.basename('/tmp/myfile.html');\n// Returns: 'myfile.html'\n</code></pre>\n<p>On Windows Node.js follows the concept of per-drive working directory.\nThis behavior can be observed when using a drive path without a backslash. For\nexample, <code>path.resolve('C:\\\\')</code> can potentially return a different result than\n<code>path.resolve('C:')</code>. For more information, see\n<a href=\"https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths\">this MSDN page</a>.</p>",
171cb0ef41Sopenharmony_ci          "type": "module",
181cb0ef41Sopenharmony_ci          "displayName": "Windows vs. POSIX"
191cb0ef41Sopenharmony_ci        }
201cb0ef41Sopenharmony_ci      ],
211cb0ef41Sopenharmony_ci      "methods": [
221cb0ef41Sopenharmony_ci        {
231cb0ef41Sopenharmony_ci          "textRaw": "`path.basename(path[, suffix])`",
241cb0ef41Sopenharmony_ci          "type": "method",
251cb0ef41Sopenharmony_ci          "name": "basename",
261cb0ef41Sopenharmony_ci          "meta": {
271cb0ef41Sopenharmony_ci            "added": [
281cb0ef41Sopenharmony_ci              "v0.1.25"
291cb0ef41Sopenharmony_ci            ],
301cb0ef41Sopenharmony_ci            "changes": [
311cb0ef41Sopenharmony_ci              {
321cb0ef41Sopenharmony_ci                "version": "v6.0.0",
331cb0ef41Sopenharmony_ci                "pr-url": "https://github.com/nodejs/node/pull/5348",
341cb0ef41Sopenharmony_ci                "description": "Passing a non-string as the `path` argument will throw now."
351cb0ef41Sopenharmony_ci              }
361cb0ef41Sopenharmony_ci            ]
371cb0ef41Sopenharmony_ci          },
381cb0ef41Sopenharmony_ci          "signatures": [
391cb0ef41Sopenharmony_ci            {
401cb0ef41Sopenharmony_ci              "return": {
411cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
421cb0ef41Sopenharmony_ci                "name": "return",
431cb0ef41Sopenharmony_ci                "type": "string"
441cb0ef41Sopenharmony_ci              },
451cb0ef41Sopenharmony_ci              "params": [
461cb0ef41Sopenharmony_ci                {
471cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
481cb0ef41Sopenharmony_ci                  "name": "path",
491cb0ef41Sopenharmony_ci                  "type": "string"
501cb0ef41Sopenharmony_ci                },
511cb0ef41Sopenharmony_ci                {
521cb0ef41Sopenharmony_ci                  "textRaw": "`suffix` {string} An optional suffix to remove",
531cb0ef41Sopenharmony_ci                  "name": "suffix",
541cb0ef41Sopenharmony_ci                  "type": "string",
551cb0ef41Sopenharmony_ci                  "desc": "An optional suffix to remove"
561cb0ef41Sopenharmony_ci                }
571cb0ef41Sopenharmony_ci              ]
581cb0ef41Sopenharmony_ci            }
591cb0ef41Sopenharmony_ci          ],
601cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.basename()</code> method returns the last portion of a <code>path</code>, similar to\nthe Unix <code>basename</code> command. Trailing <a href=\"#pathsep\">directory separators</a> are\nignored.</p>\n<pre><code class=\"language-js\">path.basename('/foo/bar/baz/asdf/quux.html');\n// Returns: 'quux.html'\n\npath.basename('/foo/bar/baz/asdf/quux.html', '.html');\n// Returns: 'quux'\n</code></pre>\n<p>Although Windows usually treats file names, including file extensions, in a\ncase-insensitive manner, this function does not. For example, <code>C:\\\\foo.html</code> and\n<code>C:\\\\foo.HTML</code> refer to the same file, but <code>basename</code> treats the extension as a\ncase-sensitive string:</p>\n<pre><code class=\"language-js\">path.win32.basename('C:\\\\foo.html', '.html');\n// Returns: 'foo'\n\npath.win32.basename('C:\\\\foo.HTML', '.html');\n// Returns: 'foo.HTML'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if <code>path</code> is not a string or if <code>suffix</code> is given\nand is not a string.</p>"
611cb0ef41Sopenharmony_ci        },
621cb0ef41Sopenharmony_ci        {
631cb0ef41Sopenharmony_ci          "textRaw": "`path.dirname(path)`",
641cb0ef41Sopenharmony_ci          "type": "method",
651cb0ef41Sopenharmony_ci          "name": "dirname",
661cb0ef41Sopenharmony_ci          "meta": {
671cb0ef41Sopenharmony_ci            "added": [
681cb0ef41Sopenharmony_ci              "v0.1.16"
691cb0ef41Sopenharmony_ci            ],
701cb0ef41Sopenharmony_ci            "changes": [
711cb0ef41Sopenharmony_ci              {
721cb0ef41Sopenharmony_ci                "version": "v6.0.0",
731cb0ef41Sopenharmony_ci                "pr-url": "https://github.com/nodejs/node/pull/5348",
741cb0ef41Sopenharmony_ci                "description": "Passing a non-string as the `path` argument will throw now."
751cb0ef41Sopenharmony_ci              }
761cb0ef41Sopenharmony_ci            ]
771cb0ef41Sopenharmony_ci          },
781cb0ef41Sopenharmony_ci          "signatures": [
791cb0ef41Sopenharmony_ci            {
801cb0ef41Sopenharmony_ci              "return": {
811cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
821cb0ef41Sopenharmony_ci                "name": "return",
831cb0ef41Sopenharmony_ci                "type": "string"
841cb0ef41Sopenharmony_ci              },
851cb0ef41Sopenharmony_ci              "params": [
861cb0ef41Sopenharmony_ci                {
871cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
881cb0ef41Sopenharmony_ci                  "name": "path",
891cb0ef41Sopenharmony_ci                  "type": "string"
901cb0ef41Sopenharmony_ci                }
911cb0ef41Sopenharmony_ci              ]
921cb0ef41Sopenharmony_ci            }
931cb0ef41Sopenharmony_ci          ],
941cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.dirname()</code> method returns the directory name of a <code>path</code>, similar to\nthe Unix <code>dirname</code> command. Trailing directory separators are ignored, see\n<a href=\"#pathsep\"><code>path.sep</code></a>.</p>\n<pre><code class=\"language-js\">path.dirname('/foo/bar/baz/asdf/quux');\n// Returns: '/foo/bar/baz/asdf'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>"
951cb0ef41Sopenharmony_ci        },
961cb0ef41Sopenharmony_ci        {
971cb0ef41Sopenharmony_ci          "textRaw": "`path.extname(path)`",
981cb0ef41Sopenharmony_ci          "type": "method",
991cb0ef41Sopenharmony_ci          "name": "extname",
1001cb0ef41Sopenharmony_ci          "meta": {
1011cb0ef41Sopenharmony_ci            "added": [
1021cb0ef41Sopenharmony_ci              "v0.1.25"
1031cb0ef41Sopenharmony_ci            ],
1041cb0ef41Sopenharmony_ci            "changes": [
1051cb0ef41Sopenharmony_ci              {
1061cb0ef41Sopenharmony_ci                "version": "v6.0.0",
1071cb0ef41Sopenharmony_ci                "pr-url": "https://github.com/nodejs/node/pull/5348",
1081cb0ef41Sopenharmony_ci                "description": "Passing a non-string as the `path` argument will throw now."
1091cb0ef41Sopenharmony_ci              }
1101cb0ef41Sopenharmony_ci            ]
1111cb0ef41Sopenharmony_ci          },
1121cb0ef41Sopenharmony_ci          "signatures": [
1131cb0ef41Sopenharmony_ci            {
1141cb0ef41Sopenharmony_ci              "return": {
1151cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
1161cb0ef41Sopenharmony_ci                "name": "return",
1171cb0ef41Sopenharmony_ci                "type": "string"
1181cb0ef41Sopenharmony_ci              },
1191cb0ef41Sopenharmony_ci              "params": [
1201cb0ef41Sopenharmony_ci                {
1211cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
1221cb0ef41Sopenharmony_ci                  "name": "path",
1231cb0ef41Sopenharmony_ci                  "type": "string"
1241cb0ef41Sopenharmony_ci                }
1251cb0ef41Sopenharmony_ci              ]
1261cb0ef41Sopenharmony_ci            }
1271cb0ef41Sopenharmony_ci          ],
1281cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.extname()</code> method returns the extension of the <code>path</code>, from the last\noccurrence of the <code>.</code> (period) character to end of string in the last portion of\nthe <code>path</code>. If there is no <code>.</code> in the last portion of the <code>path</code>, or if\nthere are no <code>.</code> characters other than the first character of\nthe basename of <code>path</code> (see <code>path.basename()</code>) , an empty string is returned.</p>\n<pre><code class=\"language-js\">path.extname('index.html');\n// Returns: '.html'\n\npath.extname('index.coffee.md');\n// Returns: '.md'\n\npath.extname('index.');\n// Returns: '.'\n\npath.extname('index');\n// Returns: ''\n\npath.extname('.index');\n// Returns: ''\n\npath.extname('.index.md');\n// Returns: '.md'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>"
1291cb0ef41Sopenharmony_ci        },
1301cb0ef41Sopenharmony_ci        {
1311cb0ef41Sopenharmony_ci          "textRaw": "`path.format(pathObject)`",
1321cb0ef41Sopenharmony_ci          "type": "method",
1331cb0ef41Sopenharmony_ci          "name": "format",
1341cb0ef41Sopenharmony_ci          "meta": {
1351cb0ef41Sopenharmony_ci            "added": [
1361cb0ef41Sopenharmony_ci              "v0.11.15"
1371cb0ef41Sopenharmony_ci            ],
1381cb0ef41Sopenharmony_ci            "changes": []
1391cb0ef41Sopenharmony_ci          },
1401cb0ef41Sopenharmony_ci          "signatures": [
1411cb0ef41Sopenharmony_ci            {
1421cb0ef41Sopenharmony_ci              "return": {
1431cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
1441cb0ef41Sopenharmony_ci                "name": "return",
1451cb0ef41Sopenharmony_ci                "type": "string"
1461cb0ef41Sopenharmony_ci              },
1471cb0ef41Sopenharmony_ci              "params": [
1481cb0ef41Sopenharmony_ci                {
1491cb0ef41Sopenharmony_ci                  "textRaw": "`pathObject` {Object} Any JavaScript object having the following properties:",
1501cb0ef41Sopenharmony_ci                  "name": "pathObject",
1511cb0ef41Sopenharmony_ci                  "type": "Object",
1521cb0ef41Sopenharmony_ci                  "desc": "Any JavaScript object having the following properties:",
1531cb0ef41Sopenharmony_ci                  "options": [
1541cb0ef41Sopenharmony_ci                    {
1551cb0ef41Sopenharmony_ci                      "textRaw": "`dir` {string}",
1561cb0ef41Sopenharmony_ci                      "name": "dir",
1571cb0ef41Sopenharmony_ci                      "type": "string"
1581cb0ef41Sopenharmony_ci                    },
1591cb0ef41Sopenharmony_ci                    {
1601cb0ef41Sopenharmony_ci                      "textRaw": "`root` {string}",
1611cb0ef41Sopenharmony_ci                      "name": "root",
1621cb0ef41Sopenharmony_ci                      "type": "string"
1631cb0ef41Sopenharmony_ci                    },
1641cb0ef41Sopenharmony_ci                    {
1651cb0ef41Sopenharmony_ci                      "textRaw": "`base` {string}",
1661cb0ef41Sopenharmony_ci                      "name": "base",
1671cb0ef41Sopenharmony_ci                      "type": "string"
1681cb0ef41Sopenharmony_ci                    },
1691cb0ef41Sopenharmony_ci                    {
1701cb0ef41Sopenharmony_ci                      "textRaw": "`name` {string}",
1711cb0ef41Sopenharmony_ci                      "name": "name",
1721cb0ef41Sopenharmony_ci                      "type": "string"
1731cb0ef41Sopenharmony_ci                    },
1741cb0ef41Sopenharmony_ci                    {
1751cb0ef41Sopenharmony_ci                      "textRaw": "`ext` {string}",
1761cb0ef41Sopenharmony_ci                      "name": "ext",
1771cb0ef41Sopenharmony_ci                      "type": "string"
1781cb0ef41Sopenharmony_ci                    }
1791cb0ef41Sopenharmony_ci                  ]
1801cb0ef41Sopenharmony_ci                }
1811cb0ef41Sopenharmony_ci              ]
1821cb0ef41Sopenharmony_ci            }
1831cb0ef41Sopenharmony_ci          ],
1841cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.format()</code> method returns a path string from an object. This is the\nopposite of <a href=\"#pathparsepath\"><code>path.parse()</code></a>.</p>\n<p>When providing properties to the <code>pathObject</code> remember that there are\ncombinations where one property has priority over another:</p>\n<ul>\n<li><code>pathObject.root</code> is ignored if <code>pathObject.dir</code> is provided</li>\n<li><code>pathObject.ext</code> and <code>pathObject.name</code> are ignored if <code>pathObject.base</code> exists</li>\n</ul>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">// If `dir`, `root` and `base` are provided,\n// `${dir}${path.sep}${base}`\n// will be returned. `root` is ignored.\npath.format({\n  root: '/ignored',\n  dir: '/home/user/dir',\n  base: 'file.txt',\n});\n// Returns: '/home/user/dir/file.txt'\n\n// `root` will be used if `dir` is not specified.\n// If only `root` is provided or `dir` is equal to `root` then the\n// platform separator will not be included. `ext` will be ignored.\npath.format({\n  root: '/',\n  base: 'file.txt',\n  ext: 'ignored',\n});\n// Returns: '/file.txt'\n\n// `name` + `ext` will be used if `base` is not specified.\npath.format({\n  root: '/',\n  name: 'file',\n  ext: '.txt',\n});\n// Returns: '/file.txt'\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">path.format({\n  dir: 'C:\\\\path\\\\dir',\n  base: 'file.txt',\n});\n// Returns: 'C:\\\\path\\\\dir\\\\file.txt'\n</code></pre>"
1851cb0ef41Sopenharmony_ci        },
1861cb0ef41Sopenharmony_ci        {
1871cb0ef41Sopenharmony_ci          "textRaw": "`path.isAbsolute(path)`",
1881cb0ef41Sopenharmony_ci          "type": "method",
1891cb0ef41Sopenharmony_ci          "name": "isAbsolute",
1901cb0ef41Sopenharmony_ci          "meta": {
1911cb0ef41Sopenharmony_ci            "added": [
1921cb0ef41Sopenharmony_ci              "v0.11.2"
1931cb0ef41Sopenharmony_ci            ],
1941cb0ef41Sopenharmony_ci            "changes": []
1951cb0ef41Sopenharmony_ci          },
1961cb0ef41Sopenharmony_ci          "signatures": [
1971cb0ef41Sopenharmony_ci            {
1981cb0ef41Sopenharmony_ci              "return": {
1991cb0ef41Sopenharmony_ci                "textRaw": "Returns: {boolean}",
2001cb0ef41Sopenharmony_ci                "name": "return",
2011cb0ef41Sopenharmony_ci                "type": "boolean"
2021cb0ef41Sopenharmony_ci              },
2031cb0ef41Sopenharmony_ci              "params": [
2041cb0ef41Sopenharmony_ci                {
2051cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
2061cb0ef41Sopenharmony_ci                  "name": "path",
2071cb0ef41Sopenharmony_ci                  "type": "string"
2081cb0ef41Sopenharmony_ci                }
2091cb0ef41Sopenharmony_ci              ]
2101cb0ef41Sopenharmony_ci            }
2111cb0ef41Sopenharmony_ci          ],
2121cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.isAbsolute()</code> method determines if <code>path</code> is an absolute path.</p>\n<p>If the given <code>path</code> is a zero-length string, <code>false</code> will be returned.</p>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">path.isAbsolute('/foo/bar'); // true\npath.isAbsolute('/baz/..');  // true\npath.isAbsolute('qux/');     // false\npath.isAbsolute('.');        // false\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">path.isAbsolute('//server');    // true\npath.isAbsolute('\\\\\\\\server');  // true\npath.isAbsolute('C:/foo/..');   // true\npath.isAbsolute('C:\\\\foo\\\\..'); // true\npath.isAbsolute('bar\\\\baz');    // false\npath.isAbsolute('bar/baz');     // false\npath.isAbsolute('.');           // false\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>"
2131cb0ef41Sopenharmony_ci        },
2141cb0ef41Sopenharmony_ci        {
2151cb0ef41Sopenharmony_ci          "textRaw": "`path.join([...paths])`",
2161cb0ef41Sopenharmony_ci          "type": "method",
2171cb0ef41Sopenharmony_ci          "name": "join",
2181cb0ef41Sopenharmony_ci          "meta": {
2191cb0ef41Sopenharmony_ci            "added": [
2201cb0ef41Sopenharmony_ci              "v0.1.16"
2211cb0ef41Sopenharmony_ci            ],
2221cb0ef41Sopenharmony_ci            "changes": []
2231cb0ef41Sopenharmony_ci          },
2241cb0ef41Sopenharmony_ci          "signatures": [
2251cb0ef41Sopenharmony_ci            {
2261cb0ef41Sopenharmony_ci              "return": {
2271cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
2281cb0ef41Sopenharmony_ci                "name": "return",
2291cb0ef41Sopenharmony_ci                "type": "string"
2301cb0ef41Sopenharmony_ci              },
2311cb0ef41Sopenharmony_ci              "params": [
2321cb0ef41Sopenharmony_ci                {
2331cb0ef41Sopenharmony_ci                  "textRaw": "`...paths` {string} A sequence of path segments",
2341cb0ef41Sopenharmony_ci                  "name": "...paths",
2351cb0ef41Sopenharmony_ci                  "type": "string",
2361cb0ef41Sopenharmony_ci                  "desc": "A sequence of path segments"
2371cb0ef41Sopenharmony_ci                }
2381cb0ef41Sopenharmony_ci              ]
2391cb0ef41Sopenharmony_ci            }
2401cb0ef41Sopenharmony_ci          ],
2411cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.join()</code> method joins all given <code>path</code> segments together using the\nplatform-specific separator as a delimiter, then normalizes the resulting path.</p>\n<p>Zero-length <code>path</code> segments are ignored. If the joined path string is a\nzero-length string then <code>'.'</code> will be returned, representing the current\nworking directory.</p>\n<pre><code class=\"language-js\">path.join('/foo', 'bar', 'baz/asdf', 'quux', '..');\n// Returns: '/foo/bar/baz/asdf'\n\npath.join('foo', {}, 'bar');\n// Throws 'TypeError: Path must be a string. Received {}'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if any of the path segments is not a string.</p>"
2421cb0ef41Sopenharmony_ci        },
2431cb0ef41Sopenharmony_ci        {
2441cb0ef41Sopenharmony_ci          "textRaw": "`path.normalize(path)`",
2451cb0ef41Sopenharmony_ci          "type": "method",
2461cb0ef41Sopenharmony_ci          "name": "normalize",
2471cb0ef41Sopenharmony_ci          "meta": {
2481cb0ef41Sopenharmony_ci            "added": [
2491cb0ef41Sopenharmony_ci              "v0.1.23"
2501cb0ef41Sopenharmony_ci            ],
2511cb0ef41Sopenharmony_ci            "changes": []
2521cb0ef41Sopenharmony_ci          },
2531cb0ef41Sopenharmony_ci          "signatures": [
2541cb0ef41Sopenharmony_ci            {
2551cb0ef41Sopenharmony_ci              "return": {
2561cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
2571cb0ef41Sopenharmony_ci                "name": "return",
2581cb0ef41Sopenharmony_ci                "type": "string"
2591cb0ef41Sopenharmony_ci              },
2601cb0ef41Sopenharmony_ci              "params": [
2611cb0ef41Sopenharmony_ci                {
2621cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
2631cb0ef41Sopenharmony_ci                  "name": "path",
2641cb0ef41Sopenharmony_ci                  "type": "string"
2651cb0ef41Sopenharmony_ci                }
2661cb0ef41Sopenharmony_ci              ]
2671cb0ef41Sopenharmony_ci            }
2681cb0ef41Sopenharmony_ci          ],
2691cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.normalize()</code> method normalizes the given <code>path</code>, resolving <code>'..'</code> and\n<code>'.'</code> segments.</p>\n<p>When multiple, sequential path segment separation characters are found (e.g.\n<code>/</code> on POSIX and either <code>\\</code> or <code>/</code> on Windows), they are replaced by a single\ninstance of the platform-specific path segment separator (<code>/</code> on POSIX and\n<code>\\</code> on Windows). Trailing separators are preserved.</p>\n<p>If the <code>path</code> is a zero-length string, <code>'.'</code> is returned, representing the\ncurrent working directory.</p>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">path.normalize('/foo/bar//baz/asdf/quux/..');\n// Returns: '/foo/bar/baz/asdf'\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">path.normalize('C:\\\\temp\\\\\\\\foo\\\\bar\\\\..\\\\');\n// Returns: 'C:\\\\temp\\\\foo\\\\'\n</code></pre>\n<p>Since Windows recognizes multiple path separators, both separators will be\nreplaced by instances of the Windows preferred separator (<code>\\</code>):</p>\n<pre><code class=\"language-js\">path.win32.normalize('C:////temp\\\\\\\\/\\\\/\\\\/foo/bar');\n// Returns: 'C:\\\\temp\\\\foo\\\\bar'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>"
2701cb0ef41Sopenharmony_ci        },
2711cb0ef41Sopenharmony_ci        {
2721cb0ef41Sopenharmony_ci          "textRaw": "`path.parse(path)`",
2731cb0ef41Sopenharmony_ci          "type": "method",
2741cb0ef41Sopenharmony_ci          "name": "parse",
2751cb0ef41Sopenharmony_ci          "meta": {
2761cb0ef41Sopenharmony_ci            "added": [
2771cb0ef41Sopenharmony_ci              "v0.11.15"
2781cb0ef41Sopenharmony_ci            ],
2791cb0ef41Sopenharmony_ci            "changes": []
2801cb0ef41Sopenharmony_ci          },
2811cb0ef41Sopenharmony_ci          "signatures": [
2821cb0ef41Sopenharmony_ci            {
2831cb0ef41Sopenharmony_ci              "return": {
2841cb0ef41Sopenharmony_ci                "textRaw": "Returns: {Object}",
2851cb0ef41Sopenharmony_ci                "name": "return",
2861cb0ef41Sopenharmony_ci                "type": "Object"
2871cb0ef41Sopenharmony_ci              },
2881cb0ef41Sopenharmony_ci              "params": [
2891cb0ef41Sopenharmony_ci                {
2901cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
2911cb0ef41Sopenharmony_ci                  "name": "path",
2921cb0ef41Sopenharmony_ci                  "type": "string"
2931cb0ef41Sopenharmony_ci                }
2941cb0ef41Sopenharmony_ci              ]
2951cb0ef41Sopenharmony_ci            }
2961cb0ef41Sopenharmony_ci          ],
2971cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.parse()</code> method returns an object whose properties represent\nsignificant elements of the <code>path</code>. Trailing directory separators are ignored,\nsee <a href=\"#pathsep\"><code>path.sep</code></a>.</p>\n<p>The returned object will have the following properties:</p>\n<ul>\n<li><code>dir</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\">&lt;string&gt;</a></li>\n<li><code>root</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\">&lt;string&gt;</a></li>\n<li><code>base</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\">&lt;string&gt;</a></li>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\">&lt;string&gt;</a></li>\n<li><code>ext</code> <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type\" class=\"type\">&lt;string&gt;</a></li>\n</ul>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">path.parse('/home/user/dir/file.txt');\n// Returns:\n// { root: '/',\n//   dir: '/home/user/dir',\n//   base: 'file.txt',\n//   ext: '.txt',\n//   name: 'file' }\n</code></pre>\n<pre><code class=\"language-text\">┌─────────────────────┬────────────┐\n│          dir        │    base    │\n├──────┬              ├──────┬─────┤\n│ root │              │ name │ ext │\n\"  /    home/user/dir / file  .txt \"\n└──────┴──────────────┴──────┴─────┘\n(All spaces in the \"\" line should be ignored. They are purely for formatting.)\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">path.parse('C:\\\\path\\\\dir\\\\file.txt');\n// Returns:\n// { root: 'C:\\\\',\n//   dir: 'C:\\\\path\\\\dir',\n//   base: 'file.txt',\n//   ext: '.txt',\n//   name: 'file' }\n</code></pre>\n<pre><code class=\"language-text\">┌─────────────────────┬────────────┐\n│          dir        │    base    │\n├──────┬              ├──────┬─────┤\n│ root │              │ name │ ext │\n\" C:\\      path\\dir   \\ file  .txt \"\n└──────┴──────────────┴──────┴─────┘\n(All spaces in the \"\" line should be ignored. They are purely for formatting.)\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if <code>path</code> is not a string.</p>"
2981cb0ef41Sopenharmony_ci        },
2991cb0ef41Sopenharmony_ci        {
3001cb0ef41Sopenharmony_ci          "textRaw": "`path.relative(from, to)`",
3011cb0ef41Sopenharmony_ci          "type": "method",
3021cb0ef41Sopenharmony_ci          "name": "relative",
3031cb0ef41Sopenharmony_ci          "meta": {
3041cb0ef41Sopenharmony_ci            "added": [
3051cb0ef41Sopenharmony_ci              "v0.5.0"
3061cb0ef41Sopenharmony_ci            ],
3071cb0ef41Sopenharmony_ci            "changes": [
3081cb0ef41Sopenharmony_ci              {
3091cb0ef41Sopenharmony_ci                "version": "v6.8.0",
3101cb0ef41Sopenharmony_ci                "pr-url": "https://github.com/nodejs/node/pull/8523",
3111cb0ef41Sopenharmony_ci                "description": "On Windows, the leading slashes for UNC paths are now included in the return value."
3121cb0ef41Sopenharmony_ci              }
3131cb0ef41Sopenharmony_ci            ]
3141cb0ef41Sopenharmony_ci          },
3151cb0ef41Sopenharmony_ci          "signatures": [
3161cb0ef41Sopenharmony_ci            {
3171cb0ef41Sopenharmony_ci              "return": {
3181cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
3191cb0ef41Sopenharmony_ci                "name": "return",
3201cb0ef41Sopenharmony_ci                "type": "string"
3211cb0ef41Sopenharmony_ci              },
3221cb0ef41Sopenharmony_ci              "params": [
3231cb0ef41Sopenharmony_ci                {
3241cb0ef41Sopenharmony_ci                  "textRaw": "`from` {string}",
3251cb0ef41Sopenharmony_ci                  "name": "from",
3261cb0ef41Sopenharmony_ci                  "type": "string"
3271cb0ef41Sopenharmony_ci                },
3281cb0ef41Sopenharmony_ci                {
3291cb0ef41Sopenharmony_ci                  "textRaw": "`to` {string}",
3301cb0ef41Sopenharmony_ci                  "name": "to",
3311cb0ef41Sopenharmony_ci                  "type": "string"
3321cb0ef41Sopenharmony_ci                }
3331cb0ef41Sopenharmony_ci              ]
3341cb0ef41Sopenharmony_ci            }
3351cb0ef41Sopenharmony_ci          ],
3361cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.relative()</code> method returns the relative path from <code>from</code> to <code>to</code> based\non the current working directory. If <code>from</code> and <code>to</code> each resolve to the same\npath (after calling <code>path.resolve()</code> on each), a zero-length string is returned.</p>\n<p>If a zero-length string is passed as <code>from</code> or <code>to</code>, the current working\ndirectory will be used instead of the zero-length strings.</p>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">path.relative('/data/orandea/test/aaa', '/data/orandea/impl/bbb');\n// Returns: '../../impl/bbb'\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">path.relative('C:\\\\orandea\\\\test\\\\aaa', 'C:\\\\orandea\\\\impl\\\\bbb');\n// Returns: '..\\\\..\\\\impl\\\\bbb'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if either <code>from</code> or <code>to</code> is not a string.</p>"
3371cb0ef41Sopenharmony_ci        },
3381cb0ef41Sopenharmony_ci        {
3391cb0ef41Sopenharmony_ci          "textRaw": "`path.resolve([...paths])`",
3401cb0ef41Sopenharmony_ci          "type": "method",
3411cb0ef41Sopenharmony_ci          "name": "resolve",
3421cb0ef41Sopenharmony_ci          "meta": {
3431cb0ef41Sopenharmony_ci            "added": [
3441cb0ef41Sopenharmony_ci              "v0.3.4"
3451cb0ef41Sopenharmony_ci            ],
3461cb0ef41Sopenharmony_ci            "changes": []
3471cb0ef41Sopenharmony_ci          },
3481cb0ef41Sopenharmony_ci          "signatures": [
3491cb0ef41Sopenharmony_ci            {
3501cb0ef41Sopenharmony_ci              "return": {
3511cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
3521cb0ef41Sopenharmony_ci                "name": "return",
3531cb0ef41Sopenharmony_ci                "type": "string"
3541cb0ef41Sopenharmony_ci              },
3551cb0ef41Sopenharmony_ci              "params": [
3561cb0ef41Sopenharmony_ci                {
3571cb0ef41Sopenharmony_ci                  "textRaw": "`...paths` {string} A sequence of paths or path segments",
3581cb0ef41Sopenharmony_ci                  "name": "...paths",
3591cb0ef41Sopenharmony_ci                  "type": "string",
3601cb0ef41Sopenharmony_ci                  "desc": "A sequence of paths or path segments"
3611cb0ef41Sopenharmony_ci                }
3621cb0ef41Sopenharmony_ci              ]
3631cb0ef41Sopenharmony_ci            }
3641cb0ef41Sopenharmony_ci          ],
3651cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.resolve()</code> method resolves a sequence of paths or path segments into\nan absolute path.</p>\n<p>The given sequence of paths is processed from right to left, with each\nsubsequent <code>path</code> prepended until an absolute path is constructed.\nFor instance, given the sequence of path segments: <code>/foo</code>, <code>/bar</code>, <code>baz</code>,\ncalling <code>path.resolve('/foo', '/bar', 'baz')</code> would return <code>/bar/baz</code>\nbecause <code>'baz'</code> is not an absolute path but <code>'/bar' + '/' + 'baz'</code> is.</p>\n<p>If, after processing all given <code>path</code> segments, an absolute path has not yet\nbeen generated, the current working directory is used.</p>\n<p>The resulting path is normalized and trailing slashes are removed unless the\npath is resolved to the root directory.</p>\n<p>Zero-length <code>path</code> segments are ignored.</p>\n<p>If no <code>path</code> segments are passed, <code>path.resolve()</code> will return the absolute path\nof the current working directory.</p>\n<pre><code class=\"language-js\">path.resolve('/foo/bar', './baz');\n// Returns: '/foo/bar/baz'\n\npath.resolve('/foo/bar', '/tmp/file/');\n// Returns: '/tmp/file'\n\npath.resolve('wwwroot', 'static_files/png/', '../gif/image.gif');\n// If the current working directory is /home/myself/node,\n// this returns '/home/myself/node/wwwroot/static_files/gif/image.gif'\n</code></pre>\n<p>A <a href=\"errors.html#class-typeerror\"><code>TypeError</code></a> is thrown if any of the arguments is not a string.</p>"
3661cb0ef41Sopenharmony_ci        },
3671cb0ef41Sopenharmony_ci        {
3681cb0ef41Sopenharmony_ci          "textRaw": "`path.toNamespacedPath(path)`",
3691cb0ef41Sopenharmony_ci          "type": "method",
3701cb0ef41Sopenharmony_ci          "name": "toNamespacedPath",
3711cb0ef41Sopenharmony_ci          "meta": {
3721cb0ef41Sopenharmony_ci            "added": [
3731cb0ef41Sopenharmony_ci              "v9.0.0"
3741cb0ef41Sopenharmony_ci            ],
3751cb0ef41Sopenharmony_ci            "changes": []
3761cb0ef41Sopenharmony_ci          },
3771cb0ef41Sopenharmony_ci          "signatures": [
3781cb0ef41Sopenharmony_ci            {
3791cb0ef41Sopenharmony_ci              "return": {
3801cb0ef41Sopenharmony_ci                "textRaw": "Returns: {string}",
3811cb0ef41Sopenharmony_ci                "name": "return",
3821cb0ef41Sopenharmony_ci                "type": "string"
3831cb0ef41Sopenharmony_ci              },
3841cb0ef41Sopenharmony_ci              "params": [
3851cb0ef41Sopenharmony_ci                {
3861cb0ef41Sopenharmony_ci                  "textRaw": "`path` {string}",
3871cb0ef41Sopenharmony_ci                  "name": "path",
3881cb0ef41Sopenharmony_ci                  "type": "string"
3891cb0ef41Sopenharmony_ci                }
3901cb0ef41Sopenharmony_ci              ]
3911cb0ef41Sopenharmony_ci            }
3921cb0ef41Sopenharmony_ci          ],
3931cb0ef41Sopenharmony_ci          "desc": "<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\nthe given <code>path</code>. If <code>path</code> is not a string, <code>path</code> will be returned without\nmodifications.</p>\n<p>This method is meaningful only on Windows systems. On POSIX systems, the\nmethod is non-operational and always returns <code>path</code> without modifications.</p>"
3941cb0ef41Sopenharmony_ci        }
3951cb0ef41Sopenharmony_ci      ],
3961cb0ef41Sopenharmony_ci      "properties": [
3971cb0ef41Sopenharmony_ci        {
3981cb0ef41Sopenharmony_ci          "textRaw": "`delimiter` {string}",
3991cb0ef41Sopenharmony_ci          "type": "string",
4001cb0ef41Sopenharmony_ci          "name": "delimiter",
4011cb0ef41Sopenharmony_ci          "meta": {
4021cb0ef41Sopenharmony_ci            "added": [
4031cb0ef41Sopenharmony_ci              "v0.9.3"
4041cb0ef41Sopenharmony_ci            ],
4051cb0ef41Sopenharmony_ci            "changes": []
4061cb0ef41Sopenharmony_ci          },
4071cb0ef41Sopenharmony_ci          "desc": "<p>Provides the platform-specific path delimiter:</p>\n<ul>\n<li><code>;</code> for Windows</li>\n<li><code>:</code> for POSIX</li>\n</ul>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">console.log(process.env.PATH);\n// Prints: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin'\n\nprocess.env.PATH.split(path.delimiter);\n// Returns: ['/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin']\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">console.log(process.env.PATH);\n// Prints: 'C:\\Windows\\system32;C:\\Windows;C:\\Program Files\\node\\'\n\nprocess.env.PATH.split(path.delimiter);\n// Returns ['C:\\\\Windows\\\\system32', 'C:\\\\Windows', 'C:\\\\Program Files\\\\node\\\\']\n</code></pre>"
4081cb0ef41Sopenharmony_ci        },
4091cb0ef41Sopenharmony_ci        {
4101cb0ef41Sopenharmony_ci          "textRaw": "`posix` {Object}",
4111cb0ef41Sopenharmony_ci          "type": "Object",
4121cb0ef41Sopenharmony_ci          "name": "posix",
4131cb0ef41Sopenharmony_ci          "meta": {
4141cb0ef41Sopenharmony_ci            "added": [
4151cb0ef41Sopenharmony_ci              "v0.11.15"
4161cb0ef41Sopenharmony_ci            ],
4171cb0ef41Sopenharmony_ci            "changes": [
4181cb0ef41Sopenharmony_ci              {
4191cb0ef41Sopenharmony_ci                "version": "v15.3.0",
4201cb0ef41Sopenharmony_ci                "pr-url": "https://github.com/nodejs/node/pull/34962",
4211cb0ef41Sopenharmony_ci                "description": "Exposed as `require('path/posix')`."
4221cb0ef41Sopenharmony_ci              }
4231cb0ef41Sopenharmony_ci            ]
4241cb0ef41Sopenharmony_ci          },
4251cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.posix</code> property provides access to POSIX specific implementations\nof the <code>path</code> methods.</p>\n<p>The API is accessible via <code>require('node:path').posix</code> or <code>require('node:path/posix')</code>.</p>"
4261cb0ef41Sopenharmony_ci        },
4271cb0ef41Sopenharmony_ci        {
4281cb0ef41Sopenharmony_ci          "textRaw": "`sep` {string}",
4291cb0ef41Sopenharmony_ci          "type": "string",
4301cb0ef41Sopenharmony_ci          "name": "sep",
4311cb0ef41Sopenharmony_ci          "meta": {
4321cb0ef41Sopenharmony_ci            "added": [
4331cb0ef41Sopenharmony_ci              "v0.7.9"
4341cb0ef41Sopenharmony_ci            ],
4351cb0ef41Sopenharmony_ci            "changes": []
4361cb0ef41Sopenharmony_ci          },
4371cb0ef41Sopenharmony_ci          "desc": "<p>Provides the platform-specific path segment separator:</p>\n<ul>\n<li><code>\\</code> on Windows</li>\n<li><code>/</code> on POSIX</li>\n</ul>\n<p>For example, on POSIX:</p>\n<pre><code class=\"language-js\">'foo/bar/baz'.split(path.sep);\n// Returns: ['foo', 'bar', 'baz']\n</code></pre>\n<p>On Windows:</p>\n<pre><code class=\"language-js\">'foo\\\\bar\\\\baz'.split(path.sep);\n// Returns: ['foo', 'bar', 'baz']\n</code></pre>\n<p>On Windows, both the forward slash (<code>/</code>) and backward slash (<code>\\</code>) are accepted\nas path segment separators; however, the <code>path</code> methods only add backward\nslashes (<code>\\</code>).</p>"
4381cb0ef41Sopenharmony_ci        },
4391cb0ef41Sopenharmony_ci        {
4401cb0ef41Sopenharmony_ci          "textRaw": "`win32` {Object}",
4411cb0ef41Sopenharmony_ci          "type": "Object",
4421cb0ef41Sopenharmony_ci          "name": "win32",
4431cb0ef41Sopenharmony_ci          "meta": {
4441cb0ef41Sopenharmony_ci            "added": [
4451cb0ef41Sopenharmony_ci              "v0.11.15"
4461cb0ef41Sopenharmony_ci            ],
4471cb0ef41Sopenharmony_ci            "changes": [
4481cb0ef41Sopenharmony_ci              {
4491cb0ef41Sopenharmony_ci                "version": "v15.3.0",
4501cb0ef41Sopenharmony_ci                "pr-url": "https://github.com/nodejs/node/pull/34962",
4511cb0ef41Sopenharmony_ci                "description": "Exposed as `require('path/win32')`."
4521cb0ef41Sopenharmony_ci              }
4531cb0ef41Sopenharmony_ci            ]
4541cb0ef41Sopenharmony_ci          },
4551cb0ef41Sopenharmony_ci          "desc": "<p>The <code>path.win32</code> property provides access to Windows-specific implementations\nof the <code>path</code> methods.</p>\n<p>The API is accessible via <code>require('node:path').win32</code> or <code>require('node:path/win32')</code>.</p>"
4561cb0ef41Sopenharmony_ci        }
4571cb0ef41Sopenharmony_ci      ],
4581cb0ef41Sopenharmony_ci      "type": "module",
4591cb0ef41Sopenharmony_ci      "displayName": "Path"
4601cb0ef41Sopenharmony_ci    }
4611cb0ef41Sopenharmony_ci  ]
4621cb0ef41Sopenharmony_ci}