-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 walks down a directory #8814
Comments
There are multiple implementations of this already floating around, including one in the FileFind package. The best way to move things forward is to do some work to clean up that package. |
I think at this point I would support having a |
Maybe we could get some inspiration from the |
Using an iterator could be cool. I'd just make sure you offer both DFS and BFS traversal of the directory tree. |
And if we were indeed going to improve on the FileFind package, using a iterative method would also help in keeping track of symlink calls.
@StefanKarpinski, did you have anything specific in mind that you want to see avoided in a |
... |
We don't generally backport features. It is present in the Compat.jl package though: JuliaLang/Compat.jl#180 |
Made this gist if anyones looking: https://gist.github.com/dopatraman/6bb694e37e5f2360449e03702fe16f65 |
To work with directories, a nice function to have is
walk
. It would walk down a directory and its subdirectories, and return a generator. Each step would give the user the current path, the subdirectories in that path, and the files inside that path.It's similar to the function
walk
on Python'sos
library:https://docs.python.org/2/library/os.html#os.walk
The text was updated successfully, but these errors were encountered: