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

Maybe remove Fpath.root, at least add Fpath.is_root. #5

Closed
dbuenzli opened this issue Feb 8, 2016 · 0 comments
Closed

Maybe remove Fpath.root, at least add Fpath.is_root. #5

dbuenzli opened this issue Feb 8, 2016 · 0 comments

Comments

@dbuenzli
Copy link
Owner

dbuenzli commented Feb 8, 2016

Fpath.root (which is Fpath.v "/") is certainly going to be wrongly used as stop condition when one loops up in a file hierarchy.

Formally the stop condition should be Fpath.(equal (parent p) p). But it seems better to add at least a Fpath.is_root function that checks if a path is a root directory, doing the right thing on paths with volumes (windows or //).

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

No branches or pull requests

1 participant