diff options
author | James M Snell <jasnell@gmail.com> | 2017-08-20 22:44:47 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-10-02 11:30:19 -0700 |
commit | 1f8d527e94ad97e7db14d18406fe0e12983358cb (patch) | |
tree | f0433f7deac9990e289973eb88cfb5c27452ccbe /doc | |
parent | 7069e633caf90a77fced619689171a92059ee29a (diff) | |
download | android-node-v8-1f8d527e94ad97e7db14d18406fe0e12983358cb.tar.gz android-node-v8-1f8d527e94ad97e7db14d18406fe0e12983358cb.tar.bz2 android-node-v8-1f8d527e94ad97e7db14d18406fe0e12983358cb.zip |
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')
-rw-r--r-- | doc/api/deprecations.md | 10 | ||||
-rw-r--r-- | doc/api/path.md | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 257b5afb65..e5495fa5ce 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -710,6 +710,16 @@ function for [`util.inspect()`][] is deprecated. Use [`util.inspect.custom`][] instead. For backwards compatibility with Node.js prior to version 6.4.0, both may be specified. +<a id="DEP00XX"></a> +### DEP00XX: path.\_makeLong() + +Type: Documentation-only + +The internal `path._makeLong()` was not intended for public use. However, +userland modules have found it useful. The internal API has been deprecated +and replaced with an identical, public `path.toNamespacedPath()` method. + + [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array [`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer diff --git a/doc/api/path.md b/doc/api/path.md index f2015db470..b072ad8135 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 |