-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Use forward slashes for paths on Windows #957
Comments
This would make life way easier... On what file systems/versions of Windows are forward-slashes handled? |
Reference: #2572 - that PR should ensure that |
Closing this because @piscisaureus objects. |
Could you elaborate? Does this block my idea to use forward slashes internally for |
No, I think that's fine... I mean, ideally we would use URLs which have saner semantics. |
The backslash vs forward slash difference between Unix and Windows is one of the oldest yet continually painful parts of making cross-platform software.
Windows itself accepts forward slashes in most (all?) of its API at this point.
I suggest that Deno always output forward slash paths on Windows.
For example,
deno.cwd()
might return"/C:/Documents/Foo"
.If we ensure that all APIs in Deno return forward slashes, we can alleviate this cross-platform issue from our users.
Issues:
deno.pathBackwards(string): string
. This will allow users to convert any forward slash path to the backward slash variety. This confines path portability issues to users who interact with such command line programs.deno.pathForwards(string): string
to convert into the forward slash variety.cc @piscisaureus
The text was updated successfully, but these errors were encountered: