This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
path.parse need #6976
Labels
Milestone
Comments
@litmit I'm looking into this now, once I've refined it and done plenty of tests I'll do a pull request. |
Closing as a duplicate of #1224. Moving the discussion there! |
chrisdickinson
pushed a commit
to chrisdickinson/node
that referenced
this issue
Nov 18, 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. nodejs#6976
chrisdickinson
pushed a commit
to chrisdickinson/node
that referenced
this issue
Nov 20, 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. Fixes nodejs#6976.
chrisdickinson
pushed a commit
to chrisdickinson/node
that referenced
this issue
Nov 20, 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. Fixes nodejs#6976.
chrisdickinson
pushed a commit
to chrisdickinson/node
that referenced
this issue
Nov 20, 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. Fixes nodejs#6976.
chrisdickinson
pushed a commit
to chrisdickinson/node
that referenced
this issue
Nov 20, 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. Fixes nodejs#6976.
chrisdickinson
pushed a commit
to chrisdickinson/node
that referenced
this issue
Nov 20, 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. Fixes nodejs#6976.
chrisdickinson
pushed a commit
that referenced
this issue
Nov 21, 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. Fixes #6976. Fixes: #6976 PR-URL: #8750 Reviewed-by: Julien Gilli <[email protected]>
Fixed in 2d17193. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When working with filenames its often need to split path to separate components simultaneously:
Internally all this functions uses universal parser splitPath that each time return all components of path. Moreover this parser returns the
drive
piece of path on Windows, but there is not any public API to achieve it.It is possible to introduce new function in
path
modulepath.parse(f)
?path.parse
must return object with next properties:root
- drive or UNC prefix (Windows specific)dir
directory name of a path (===path.dirname()
)base
last portion of a path (===path.basename()
)ext
extension (===path.extname()
)name
basename without extension and dotAlso, for completness, need the function
path.format(pathObj)
which takes a parsed path object and return a formatted path string.The text was updated successfully, but these errors were encountered: