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

experiment with an abstract VerbatimPath datatype #2

Open
dherman opened this issue Mar 12, 2018 · 1 comment
Open

experiment with an abstract VerbatimPath datatype #2

dherman opened this issue Mar 12, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@dherman
Copy link
Owner

dherman commented Mar 12, 2018

It'd be pretty nice to have normalization (see #1) enforced automatically by an abstract datatype. That way you could take any path, convert it to an equivalent VerbatimPath, and know for sure you'd get all the usual conveniences without running into 260-character path-length restrictions.

Users would still need to understand that the path's string representation was a verbatim path, e.g. for serializing or passing to OS API's.

@dherman dherman added the enhancement New feature or request label Mar 12, 2018
@luser
Copy link

luser commented Mar 21, 2018

I was literally just musing about this exact thing. It would be great to have a type to enforce this. AFAIK it's safe to pass these paths to all Windows APIs, so it should be OK to use them liberally and have the type implement Deref<Path> and AsRef<Path>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants