Return the last portion of a path, similar to the Unix basename command.
Return the last portion of a path, similar to the Unix basename command.
must be a string.
optional, if given, must also be a string.
the last portion of a path
The platform-specific path delimiter, ';' or ':'.
The platform-specific path delimiter, ';' or ':'.
Return the directory name of a path, similar to the Unix dirname command.
Return the directory name of a path, similar to the Unix dirname command.
must be a string.
the directory name of a path
Return the extension of the path, from the last '.' to end of string in the last portion of the path.
Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.
must be a string.
the extension of the path (e.g. ".jpg")
Returns a path string from an object.
Returns a path string from an object. This is the opposite of path.parse. If pathObject has dir and base properties, the returned string will be a concatenation of the dir property, the platform-dependent path separator, and the base property. If the dir property is not supplied, the root property will be used as the dir property. However, it will be assumed that the root property already ends with the platform-dependent path separator. In this case, the returned string will be the concatenation of the root property and the base property. If both the dir and the root properties are not supplied, then the returned string will be the contents of the base property. If the base property is not supplied, a concatenation of the name property and the ext property will be used as the base property.
the given path object
a path string from an object
Determines whether path is an absolute path.
Determines whether path is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
must be a string.
true, if the path is an absolute path
Join all arguments together and normalize the resulting path.
Join all arguments together and normalize the resulting path.
the first portion of the path
All arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
a composite path
Normalize a path, taking care of '..' and '.' parts.
Normalize a path, taking care of '..' and '.' parts. path must be a string. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
the path to be normalized
the normalized path
Returns an object from a path.
Provide access to aforementioned path methods but always interact in a posix compatible way.
Provide access to aforementioned path methods but always interact in a posix compatible way.
Solve the relative path from from to to.
Solve the relative path from from to to.
At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve, which means we see that:
path.resolve(from, path.relative(from, to)) == path.resolve(to)
must be a string.
must be a string.
the relative path
Resolves to to an absolute path.
Resolves to to an absolute path. If to isn't already absolute from arguments are prepended in right to left order, until an absolute path is found. If after using all from paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. Empty string from arguments are ignored.
All arguments must be strings.
the absolute path
path.resolve([from ...], to)
The platform-specific file separator, '\\' or '/'.
The platform-specific file separator, '\\' or '/'.
Provide access to aforementioned path methods but always interact in a win32 compatible way.
Provide access to aforementioned path methods but always interact in a win32 compatible way.
Path Singleton