-
Notifications
You must be signed in to change notification settings - Fork 0
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
exists
should check directories
#36
Comments
some thoughts:
considering all of this, I think currently the best course of action is merely to add this behaviour to the documentation, unless use-cases for checking existence of empty directories are brought up. |
I added the hint to the docs. Will keep this issue open for now for further discussion on the matter. |
That may often be true in practice, but I don't think it has anything to do with how Directories exist whether or not they contain anything. If I just ask whether Actually, I could imagine the hypothesis above being true for the |
I understand the logical correctness perspective. My point is, checking existence of directories seems like a foot-gun in most cases (you do it because it is easier to do and seems correct while it is not), unless I'm missing some use-cases. A counter argument is perhaps that the current behaviour is not adequate in preventing this foot-gun? Perhaps looking at various use cases helps this discussion. |
exists
does not check existence of directories. this can be confusing, and also is inconsistent with behaviour ofremove
, where if a directory is explicitly specified (without any glob patterns) it will be removed.The text was updated successfully, but these errors were encountered: