Convert Files Into A New Format While Copying Them Into A Duplicate Directory Structure In Rust
This is the code I'm using when I need to make new versions of files in a different format. It does the following :
-
Finds all [TODO: Code shorthand span ] files via a glob search in an input directory
-
Creates a tuple with the input path plus an output file path in a new root directory and with a new file extension
-
Creates the directory structure under the output directory root
-
Returns a Vec of the tuples with the file paths for processing
rust
use Error;
use glob;
use fs;
use PathBuf;