Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2017-08-21 08:44:47 +0300
committerJames M Snell <jasnell@gmail.com>2017-10-02 21:30:19 +0300
commit1f8d527e94ad97e7db14d18406fe0e12983358cb (patch)
treef0433f7deac9990e289973eb88cfb5c27452ccbe /doc/api/path.md
parent7069e633caf90a77fced619689171a92059ee29a (diff)
path: deprecate internal _makeLong, replace
Replace the internal `path._makeLong()` with a public `path.toLongUNCPath()` method. Add documentation. PR-URL: https://github.com/nodejs/node/pull/14956 Ref: https://github.com/standard-things/esm/issues/66 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/path.md')
-rw-r--r--doc/api/path.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/api/path.md b/doc/api/path.md
index f2015db4704..b072ad8135c 100644
--- a/doc/api/path.md
+++ b/doc/api/path.md
@@ -543,6 +543,21 @@ On Windows:
accepted as path segment separators; however, the `path` methods only add
backward slashes (`\`).
+## path.toNamespacedPath(path)
+<!-- YAML
+added: REPLACEME
+-->
+
+* `path` {string}
+* Returns: {string}
+
+On Windows systems only, returns an equivalent [namespace-prefixed path][] for
+the given `path`. If `path` is not a string, `path` will be returned without
+modifications.
+
+This method is meaningful only on Windows system. On posix systems, the
+method is non-operational and always returns `path` without modifications.
+
## path.win32
<!-- YAML
added: v0.11.15
@@ -559,3 +574,4 @@ of the `path` methods.
[`path.sep`]: #path_path_sep
[`path.win32`]: #path_path_win32
[MSDN-Rel-Path]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#fully_qualified_vs._relative_paths
+[namespace-prefixed path]: https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces