export_pan_procedures

Function export_pan_procedures 

Source
pub fn export_pan_procedures(
    pan_file: &Path,
    pan_data: &[u8],
    output_dir: Option<&Path>,
    extension: Option<&str>,
    encoding: PanCsvEncoding,
) -> Result<String>
Expand description

Export all procedures from a PAN file into individual files within a folder.

If output_dir is not specified, creates a folder named <stem>_procedures alongside the PAN file (or in the current directory if input is from stdin). Errors if the target folder already exists.

Procedure names are sanitized with ctb_io::file::clean_file_name to ensure valid filenames and avoid overly long paths. Name collisions are disambiguated with numeric suffixes; if a unique filename cannot be found, returns an error.