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

recursive globbing not work like pathlib #628

Open
yakkle opened this issue Dec 16, 2022 · 0 comments
Open

recursive globbing not work like pathlib #628

yakkle opened this issue Dec 16, 2022 · 0 comments

Comments

@yakkle
Copy link

yakkle commented Dec 16, 2022

recursive globbing not work like pathlib. Is this intented?

if cwd is /home/yakkle/tmp has subdirectory foo/bar, and has file sample.zip in foo/bar :

>>> local.cwd // "**/*.zip"
[]
>>> 

will show empty list.

if base path is /home/yakkle/tmp/foo:

>>> local.cwd["foo"] // "**/*.zip"
[<LocalPath /home/yakkle/tmp/foo/bar/sample.zip>]
>>> 

will show found result. but it only 1 depth search. not recursive.


python docs says :

The “**” pattern means “this directory and all subdirectories, recursively”. In other words, it enables recursive globbing:

https://docs.python.org/3.9/library/pathlib.html?highlight=mkdir#pathlib.Path.glob

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