Lines Matching +full:- +full:- +full:base +full:- +full:directory
3 <!--introduced_in=v0.10.0-->
5 > Stability: 2 - Stable
7 <!-- source_link=lib/path.js -->
9 The `node:path` module provides utilities for working with file and directory
21 Windows-style paths are being used.
59 On Windows Node.js follows the concept of per-drive working directory.
63 [this MSDN page][MSDN-Rel-Path].
67 <!-- YAML
70 - version: v6.0.0
71 pr-url: https://github.com/nodejs/node/pull/5348
72 description: Passing a non-string as the `path` argument will throw now.
73 -->
80 the Unix `basename` command. Trailing [directory separators][`path.sep`] are
92 case-insensitive manner, this function does not. For example, `C:\\foo.html` and
94 case-sensitive string:
109 <!-- YAML
111 -->
115 Provides the platform-specific path delimiter:
142 <!-- YAML
145 - version: v6.0.0
146 pr-url: https://github.com/nodejs/node/pull/5348
147 description: Passing a non-string as the `path` argument will throw now.
148 -->
153 The `path.dirname()` method returns the directory name of a `path`, similar to
154 the Unix `dirname` command. Trailing directory separators are ignored, see
166 <!-- YAML
169 - version: v6.0.0
170 pr-url: https://github.com/nodejs/node/pull/5348
171 description: Passing a non-string as the `path` argument will throw now.
172 -->
207 <!-- YAML
209 -->
214 * `base` {string}
226 * `pathObject.ext` and `pathObject.name` are ignored if `pathObject.base` exists
231 // If `dir`, `root` and `base` are provided,
232 // `${dir}${path.sep}${base}`
237 base: 'file.txt',
246 base: 'file.txt',
251 // `name` + `ext` will be used if `base` is not specified.
265 base: 'file.txt',
272 <!-- YAML
274 -->
281 If the given `path` is a zero-length string, `false` will be returned.
308 <!-- YAML
310 -->
316 platform-specific separator as a delimiter, then normalizes the resulting path.
318 Zero-length `path` segments are ignored. If the joined path string is a
319 zero-length string then `'.'` will be returned, representing the current
320 working directory.
334 <!-- YAML
336 -->
346 instance of the platform-specific path segment separator (`/` on POSIX and
349 If the `path` is a zero-length string, `'.'` is returned, representing the
350 current working directory.
378 <!-- YAML
380 -->
386 significant elements of the `path`. Trailing directory separators are ignored,
393 * `base` {string}
404 // base: 'file.txt',
411 │ dir │ base │
426 // base: 'file.txt',
433 │ dir │ base │
445 <!-- YAML
448 - version: v15.3.0
449 pr-url: https://github.com/nodejs/node/pull/34962
451 -->
462 <!-- YAML
465 - version: v6.8.0
466 pr-url: https://github.com/nodejs/node/pull/8523
469 -->
476 on the current working directory. If `from` and `to` each resolve to the same
477 path (after calling `path.resolve()` on each), a zero-length string is returned.
479 If a zero-length string is passed as `from` or `to`, the current working
480 directory will be used instead of the zero-length strings.
500 <!-- YAML
502 -->
517 been generated, the current working directory is used.
520 path is resolved to the root directory.
522 Zero-length `path` segments are ignored.
525 of the current working directory.
535 // If the current working directory is /home/myself/node,
543 <!-- YAML
545 -->
549 Provides the platform-specific path segment separator:
574 <!-- YAML
576 -->
581 On Windows systems only, returns an equivalent [namespace-prefixed path][] for
586 method is non-operational and always returns `path` without modifications.
590 <!-- YAML
593 - version: v15.3.0
594 pr-url: https://github.com/nodejs/node/pull/34962
596 -->
600 The `path.win32` property provides access to Windows-specific implementations
605 [MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualif…
606 [`TypeError`]: errors.md#class-typeerror
611 [namespace-prefixed path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#na…