diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 257b5afb65b4e4..e5495fa5ceb587 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. + +### 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 f2015db47048d7..b072ad8135cd3b 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) + + +* `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