Function cargo_auto_lib::copy_folder_files_into_module

source ·
pub fn copy_folder_files_into_module(
    folder_path: &Path,
    module_path: &Path,
    ext_for_binary_files: &[&str],
    exclude_big_folders: &[String]
)
Expand description

Copy all files from the folder into a module as strings (static &str)

The Rust code to modify has the markers:

//comment region: files copied into strings by automation tasks

//comment endregion: files copied into strings by automation tasks

In this instructions I changed [//] to [//comment] to not process these markers.

First we create the complete text, then we check if the old text needs to be replaced.

Binary files need a special treatment:

ext_for_binary_files=vec![".ico",".jpg",".png",".woff2"];

Exclude big folders:

exclude_big_folders = vec!["/.git","/target","/docs"];