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

doc: path functions ignore trailing slashes #12181

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
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
9 changes: 6 additions & 3 deletions doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ changes:
* Returns: {string}

The `path.basename()` methods returns the last portion of a `path`, similar to
the Unix `basename` command.
the Unix `basename` command. Conforming to Posix standards, trailing `/`
characters are not counted as part of the pathname.

For example:

Expand Down Expand Up @@ -128,7 +129,8 @@ changes:
* Returns: {string}

The `path.dirname()` method returns the directory name of a `path`, similar to
the Unix `dirname` command.
the Unix `dirname` command. Conforming to Posix standards, trailing `/`
characters are not counted as part of the pathname.

For example:

Expand Down Expand Up @@ -347,7 +349,8 @@ added: v0.11.15
* Returns: {Object}

The `path.parse()` method returns an object whose properties represent
significant elements of the `path`.
significant elements of the `path`. Note that trailing `/` characters are not
counted as part of the pathname and therefore ignored.

The returned object will have the following properties:

Expand Down