[issue26096] '*' glob string matches dot files in pathlib
JitterMan
report at bugs.python.org
Thu Jan 14 16:16:05 EST 2016
JitterMan added the comment:
The same issues applies with '**', where it is harder to work around. The shell version of '**' prunes out hidden files and directories at all levels, whereas the pathlib.glob() includes all hidden directories.
Major surgery would be required to filter out hidden files and directories from the output of pathlib.glob(), which would be expensive and complicated. Perhaps an option is called for that would allow pathlib.glob() to prune its search to only non-hidden directories if requested. And if that seems like a good idea, perhaps there could also be options that specify that only files or only directories should be returned.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26096>
_______________________________________
More information about the Python-bugs-list
mailing list