-
Notifications
You must be signed in to change notification settings - Fork 4
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
walkdir library #104
Comments
What's wrong with Currently with Dir["**/*"].each do |f|
puts f
end |
Hi @watzon ! Please read at least one of the implementations e.g. Python I referred, and find if it is already implemented in Crystal. Please update me if I missed something. Thank you! |
@zhangkaizhao I have looked through all of the implementations and I haven't seen much of anything that can't be done with plain Crystal. That's why I want to know what your use-case is. What are you wanting to do that you can do in one of those libs, but not with |
@watzon Thanks! After some more investigation I think you are right. I made a mistake. |
This is my pull request lilydjwg/walkdir-test#1 . Without this method, I have to open sub directories recursively:
and this maybe hits the recursion limit for too deep sub directories. And another problem is when I run without the line
I don't know if this is an issue. |
You can use |
Use `Dir.glob` instead of `Dir.[]` to avoid creating an array. This was suggested by @bew in a comment [1]. [1]: crystal-community/crystal-libraries-needed#104 (comment)
@brew Thank you! I have updated the pull request with |
Implementation in other popular languages:
walkdir_test: https://github.com/lilydjwg/walkdir-test
The text was updated successfully, but these errors were encountered: