remove_empty_subdirs

Crates.ioremove_empty_subdirs
lib.rsremove_empty_subdirs
version0.1.1
sourcesrc
created_at2018-09-02 16:09:05.060618
updated_at2018-09-14 04:49:49.249406
descriptionRecursively remove empty sub-directories
homepagehttps://github.com/zhangkaizhao/remove_empty_subdirs
repositoryhttps://github.com/zhangkaizhao/remove_empty_subdirs
max_upload_size
id82639
size28,484
Kaizhao Zhang (zhangkaizhao)

documentation

https://docs.rs/remove_empty_subdirs

README

remove_empty_subdirs

Recursively remove empty sub-directories.

Note:

  • Hidden directories which start with ".", e.g. ".git" are ignored.
  • Permission denied directories and their sub-directories are ignored.

Usage

Library

Add the library as a dependency to your project by inserting

remove_empty_subdirs = "0.1.0"

into the [dependencies] section of your Cargo.toml file.

Then use it in the source code of your project. For example:

extern crate remove_empty_subdirs;

use std::path::Path;

use remove_empty_subdirs::remove_empty_subdirs;

fn main() {
    let path = Path::new("test_dir");
    remove_empty_subdirs(path).unwrap();
}

Executable

First, build the executable in examples/ directory:

cargo build --release --examples

Then copy the built executable target/release/examples/remove_empty_subdirs to anywhere you like.

Run the executable:

/path/to/remove_empty_subdirs --help

to get the help for usage.

License

This project is licensed under either of

at your option.

Commit count: 6

cargo fmt