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

io/fs: add clearer documentation for "unrooted" paths #42716

Open
mpx opened this issue Nov 19, 2020 · 0 comments
Open

io/fs: add clearer documentation for "unrooted" paths #42716

mpx opened this issue Nov 19, 2020 · 0 comments

Comments

@mpx
Copy link
Contributor

@mpx mpx commented Nov 19, 2020

io/fs requires "unrooted" paths, but it is currently only documented in passing under io/fs.ValidPath.

This may be surprising to many developers starting to use io/fs. Eg, walking "/" on os.DirFS or embed.FS filesystems will fail. Walking "." is less obvious since this is traditionally associated with the current working directory which doesn't exist for virtual filesystems.

Cc @rsc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants