Module posix

Module posix 

Source
Expand description

nodejs_path::posix provides access to POSIX specific implementations of the path methods.

Macros§

basename
Returns the last portion of a path, similar to the Unix basename command. Trailing directory separators are ignored.
join
The method joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
resolve
Resolves a sequence of paths or path segments into an absolute path.

Constants§

delimiter
Provides the platform-specific path delimiter:
sep
Provides the platform-specific path segment separator:

Functions§

basename_impl
basename_impl_without_ext
cwd
Get current working directory. Just like process.cwd()
dirname
Returns the directory name of a path, similar to the Unix dirname command. Trailing directory separators are ignored,
extname
Returns the extension of the path, from the last occurrence of the . (period) character to end of string in the last portion of the path. If there is no . in the last portion of the path, or if there are no . characters other than the first character of the basename of path, an empty string is returned.
format
Returns a path string from an object. This is the opposite of nodejs_path::parse().
is_absolute
The method determines if path is an absolute path. If the given path is a zero-length string, false will be returned. #Example
join_impl
normalize
The path.normalize() method normalizes the given path, resolving ‘..’ and ‘.’ segments.
parse
Example
relative
method returns the relative path from from to to based on the current working directory. If from and to each resolve to the same path (after calling resolve() on each), a zero-length string is returned.
resolve_impl
to_namespaced_path