This repository has been archived by the owner. It is now read-only.

Add 'path.sep' to get the path separator. #3057

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants

npcode commented Apr 3, 2012

This patch adds 'sep' property into path module, to get the path separator, like python's os.path.sep.

It will be useful to write a platform-independent code to parse a path.

posix:

'a/b/c'.split(require('path').sep) // => ['a', 'b', 'c']

win32:

'a\\b\\c'.split(require('path').sep) // => ['a', 'b', 'c']

Seems like an ok idea to me (though usually using the path module will do what you need). Needs tests and docs.

npcode commented Apr 3, 2012

Ok, I have done.

Member

bnoordhuis commented Apr 30, 2012

Yi, I'll merge this but can you sign the CLA first? Thanks.

npcode commented May 1, 2012

Ok, I have done.

I'm very glad that you'll merge my commit.

2012/5/1 Ben Noordhuis
reply@reply.github.com:

Yi, I'll merge this but can you sign the CLA first? Thanks.


Reply to this email directly or view it on GitHub:
joyent#3057 (comment)

Member

bnoordhuis commented May 1, 2012

Thanks Yi, merged in 4bd54da.

@bnoordhuis bnoordhuis closed this May 1, 2012

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