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

Rmtree command #440

Merged
merged 3 commits into from
Jan 15, 2020
Merged

Rmtree command #440

merged 3 commits into from
Jan 15, 2020

Conversation

ptc-shunt
Copy link

This branch is a cleaner implementation of the --rmtree functionality that was included in PR#420 (which I propose be abandoned - I will make a separate PR for its other changes.

The rmtree command leverages the existing read_dir function to handle the directory walk, and updates that function to enable a depth-first walk (so that we can fully delete a directory's contents before deleting the directory itself). I decided that the cleanest change was to call the callback both before and after processing the directory's contents, so the callback can act on either or both of these events according to its requirements.

…the read_dir function to invoke the callback both before and after processing the contents of a directory. Tidied up indentation in copy_file_callback.
@gabebear
Copy link

Thanks for all the hard work

@gabebear gabebear merged commit b55ad12 into ios-control:master Jan 15, 2020
geekonion pushed a commit to geekonion/ios-deploy that referenced this pull request Jun 29, 2023
* Added --rmtree command for recursive directory deletion. Generalized the read_dir function to invoke the callback both before and after processing the contents of a directory. Tidied up indentation in copy_file_callback.

* Added missing call to check_error.
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

Successfully merging this pull request may close these issues.

2 participants