Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path: correct pathEquals to pathsEqual #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions doc/api/path.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This module contains utilities for handling and transforming file paths.
Almost all these methods perform only string transformations. The file system is not consulted to check whether paths are valid.
Supports both windows and posix.
Supports both windows and posix.

Use `require('path')` to use this module. The following methods are provided:

Expand All @@ -12,11 +12,11 @@ Gets the filesystems root path.

## path.getSep()

Gets the filesystems default path seperator
Gets the filesystems default path seperator.

## path.pathEquals(a, b)
## path.pathsEqual(a, b)

Checks if path a is equal to b
Checks if path a is equal to b.

## path.normalize(filepath)

Expand All @@ -26,12 +26,12 @@ When multiple slashes are found, they're replaced by a single one; when the path

## path.join(...)

Joins a splat of different strings together with the default seperator to form a valid path
Joins a splat of different strings together with the default seperator to form a valid path.

## path.resolve([from ...], to)

Works backwards, joining the arguments until it resolves to an absolute path.
If an absolute path is not resolved, then the current working directory is prepended
Works backwards, joining the arguments until it resolves to an absolute path.
If an absolute path is not resolved, then the current working directory is prepended.

E.g.

Expand All @@ -41,8 +41,8 @@ E.g.
```
## path.relative(from, to)

Returns the relative path from 'from' to 'to'
If no relative path can be solved, then 'to' is returned
Returns the relative path from 'from' to 'to'.
If no relative path can be solved, then 'to' is returned.

## path.dirname(filepath)

Expand All @@ -54,20 +54,20 @@ Return the last portion of a path. Similar to the Unix basename command.

## path.extname(filepath)

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. Examples:
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.

## path.isAbsolute(filepath)

Checks if filepath is absolute
Checks if filepath is absolute.

## path.isUNC(filepath)

Checks if the path follows Microsofts universal naming convention
Checks if the path follows Microsofts universal naming convention.

## path.isDriveRelative(filepath)

Drive-relative paths are unique to Windows and use the format <letter>:filepath
Drive-relative paths are unique to Windows and use the format <letter>:filepath.

## path.normalizeSeparators(filepath)

Returns file path with posix seperators
Returns file path with posix seperators.