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

fs.glob pattern my_folder/**/* not working as expected #574

Open
LutzFassl opened this issue May 16, 2023 · 0 comments
Open

fs.glob pattern my_folder/**/* not working as expected #574

LutzFassl opened this issue May 16, 2023 · 0 comments

Comments

@LutzFassl
Copy link

Hello, I was under the impression I can use fs.glob mostly like the standard glob library.
However I wonder if it is intended that the pattern folder/**/* behaves differently between them.

Standard glob: glob.glob("my_folder/**/*", recursive=True) --> ** means same folder or any folder level below
--> Finds all files in my_folder and below. Folders are excluded, which is desired in my case.

fs.glob: fs.glob("my_folder/**/*") seems to behave differently: does not find any files that are directly within my_folder.
Finds only files that are at least one level below my_folder.

So the best thing for me would probably to run with fs.glob("my_folder/**") and then filter out the directories afterwards... ?

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