Skip to content

std::io::fs::mkdir_recursive overhaul #6109

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
kud1ing opened this issue Apr 29, 2013 · 5 comments
Closed

std::io::fs::mkdir_recursive overhaul #6109

kud1ing opened this issue Apr 29, 2013 · 5 comments

Comments

@kud1ing
Copy link

kud1ing commented Apr 29, 2013

  • Currently std::io::fs::mkdir_recursive calls itself recursively. For deep paths this could (in theory) be a problem.
    An interative version could avoid this.
  • Consider renaming it to something like make_dirs (analogous to make_dir)
  • Deal with the case "directory exists but with different permissions".
@toddaaro
Copy link
Contributor

toddaaro commented Jul 3, 2013

@msullivan has some thoughts on this, pinging him to resolve it.

@huonw
Copy link
Member

huonw commented Aug 19, 2013

Triage visit; still relevant: same name, still recursive, and even has the following comment:

// tjc: if directory exists but with different permissions,
// should we return false?

os::mkdir_recursive needs a bit of an overhaul.

@kud1ing
Copy link
Author

kud1ing commented Aug 19, 2013

I've renamed and reworded the issue.

@sanxiyn
Copy link
Member

sanxiyn commented Dec 16, 2013

Triage. Still recursive, permission comment still there, but moved to std::io::fs::mkdir_recursive.

lbonn added a commit to lbonn/rust that referenced this issue Mar 10, 2014
bors added a commit that referenced this issue Mar 13, 2014
As mentioned in #6109, ```mkdir_recursive``` doesn't really need to use recursive calls, so here is an iterative version.
The other points of the proposed overhaul (renaming and existing permissions) still need to be resolved.

I also bundled an iterative ```rmdir_recursive```, for the same reason.

Please do not hesitate to provide feedback on style as this is my first code change in rust.
@aturon aturon added the A-io label Dec 8, 2014
@kud1ing
Copy link
Author

kud1ing commented Dec 30, 2014

Probably fixed by 4c2ce3b

@kud1ing kud1ing closed this as completed Dec 30, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants