Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

path: added parse() and format() functions #7429

Closed
wants to merge 2 commits into from
Closed

path: added parse() and format() functions #7429

wants to merge 2 commits into from

Conversation

roryrjb
Copy link

@roryrjb roryrjb commented Apr 8, 2014

The parse() function splits a path and returns an object with the different
elements. The format() function is the reverse of this and adds an objects
corresponding path elements to make up a string. #6976

@Nodejs-Jenkins
Copy link

Thank you for contributing this pull request! Here are a few pointers to make sure your submission will be considered for inclusion.

Commit roryrjb/node@a644319aaa0e323b28d5cac6099f65d24f3a16db has the following error(s):

  • Commit message line too long: 2

The following commiters were not found in the CLA:

  • Rory Bradford

You can fix all these things without opening another issue.

Please see CONTRIBUTING.md for more information

The parse() function splits a path and returns an object

with the different elements. The format() function is the

reverse of this and adds an objects corresponding path

elements to make up a string. #6976
@roryrjb
Copy link
Author

roryrjb commented Apr 9, 2014

I amended the commit message in 06df525 so any of the lines aren't too long.

@dougwilson
Copy link
Member

Add tests for Windows UNC paths?

also fixed UNC path bug.
@roryrjb
Copy link
Author

roryrjb commented Apr 9, 2014

@dougwilson thanks for that as there was a bug with parsing a UNC path, which I have now fixed in the latest commit.

@Mithgol
Copy link

Mithgol commented Jul 24, 2014

Now the CLA's no longer necessary; can one of the admins verify this patch?

@@ -438,6 +462,34 @@ if (isWindows) {
return outputParts.join('/');
};

// Return all elements

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate

@indutny
Copy link
Member

indutny commented Jul 25, 2014

@Mithgol I certainly could land it if someone will fix the style.

@indutny
Copy link
Member

indutny commented Jul 25, 2014

Hm... though, after more careful reading, I am not as certain as I was about it. Why do we really need it in core?

@Mithgol
Copy link

Mithgol commented Jul 25, 2014

Because splitPath is already in the core and this PR just exposes a wrapper around it?

@chrisdickinson
Copy link

Closing this in favor of #8750. @roryrjb, great work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants