Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for fs::walk_dir #27707
Comments
alexcrichton
added
A-io
T-libs
B-unstable
labels
Aug 12, 2015
This comment has been minimized.
This comment has been minimized.
|
I've found Java's |
Ms2ger
referenced this issue
Aug 16, 2015
Open
Tracking: Unstable Rust feature gates used by Servo #5286
This comment has been minimized.
This comment has been minimized.
|
I'd like to take the conn on this, and echo this thought:
I've taken a brief survey other other implementations which range from every-feature-in-the-book (
Most of the interfaces I've seen use a user-provided function to control iteration or even response to errors. I feel like we should probably pursue the same functionality but with iterators if possible, although I'm not sure what it will look like yet. Possibly methods on the iterator itself? (Although this is a design that is not too common in the Rust world.) How does this sound for a reasonable starting point? |
This comment has been minimized.
This comment has been minimized.
|
This may also be worth looking at:
|
This comment has been minimized.
This comment has been minimized.
|
@SimonSapin fwiw, that PEP has apparently already been taken into account for the current design: #16236. |
This comment has been minimized.
This comment has been minimized.
|
Never mind, then :) |
This comment has been minimized.
This comment has been minimized.
|
@BurntSushi that all sounds great to me! I know that whenever I've wanted to use a fs walk-like function I've always wanted the option to say "don't descend into this directory" so it's certainly something I'd like to see! This definitely seems like a good candidate for development outside the standard library as it can be a relatively meaty piece of functionality and in theory our fs bindings should give you all the support you need to build this. |
This comment has been minimized.
This comment has been minimized.
|
I've finished my initial implementation: http://burntsushi.net/rustdoc/walkdir/ Overall, I'm pretty happy with it. It isn't clear to me whether it's destined for |
This comment has been minimized.
This comment has been minimized.
|
I think the best path forward would be to maybe let it bake for a bit, move it to the nursery, see how it turns out, and then eventually write an RFC to become an official rust-lang crate, and perhaps finally move it into the standard library. I don't necessarily feel an urgency to move it into the standard library right now, and the fast iteration outside seems quite useful for now! |
This comment has been minimized.
This comment has been minimized.
|
Sounds good to me! |
This comment has been minimized.
This comment has been minimized.
|
On Mon, Sep 28, 2015 at 6:56 AM, Andrew Gallant notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
|
I wonder if we should go ahead and deprecate the in-tree version? Is there a path toward stabilization as-is? Nominating for 1.6 discussion. |
aturon
added
the
I-nominated
label
Nov 3, 2015
This comment has been minimized.
This comment has been minimized.
|
I'd vote to deprecate as well. |
This comment has been minimized.
This comment has been minimized.
|
Deprecation sounds good. Stabilizing as-is definitely seems bad. |
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added
final-comment-period
and removed
I-nominated
labels
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this in triage today and the decision was to deprecate |
alexcrichton commentedAug 12, 2015
This is a tracking issue for the
fs_walkunstable feature in the standard library. Some of the open questions currently are:WalkBuilderstructure.The C++
<filesystem>implementation of walking directories is quite a useful reference in terms of what options we may want as well as what we haven't implemented. Note that this is a large enough feature that this may want to be prototyped outside the standard library first and then perhaps consider moving in at a later date.