pub fn copy_img_folder(
source_file: &Path,
dest_file: &Path,
) -> Result<(), Error>Expand description
Copies the img folder from source directory to destination directory.
Docusaurus projects often have img folders alongside markdown files containing referenced images. This function preserves that structure in the output.
§Arguments
source_file: Path to the source markdown filedest_file: Path to the destination markdown file
§Returns
Ok(())if img folder doesn’t exist or is successfully copiedErrif directory creation or file copying fails
§Behavior
- If no img folder exists in the source directory, the function succeeds silently
- If img folder exists, creates it in destination and copies all files
- Preserves original filenames