flatten-directory

Crates.ioflatten-directory
lib.rsflatten-directory
version1.0.0
sourcesrc
created_at2024-10-14 10:01:41.061802
updated_at2024-10-14 10:01:41.061802
descriptionmove all files from sub-directories to target directory, then remove all directories recursively
homepagehttps://github.com/hoshiyuki-tamako/flatten-directory-rs
repositoryhttps://github.com/hoshiyuki-tamako/flatten-directory-rs
max_upload_size
id1408147
size18,000
星雪靈兒 (hoshiyuki-tamako)

documentation

README

Flatten directory

  1. move all files from sub-folders to target directory

  2. then remove all directories recursively

Install

cargo install flatten-directory

Usage

Command Line

flatten-directory .
flatten-directory "/mnt/d/download"

Use as library

Basic

use flatten_directory::FlattenDirectory;

fn main() {
    FlattenDirectory::new("/tmp/test".into()).execute().unwrap();
}
Commit count: 4

cargo fmt