pub fn write_chart_to_disk(
path: &Path,
bytes: &[u8],
overwrite: bool,
) -> Result<u64, McpError>Expand description
Write chart bytes to path, creating the parent directory if needed and
honoring the overwrite flag.
Errors:
PermissionDeniedifpathexists andoverwrite=false(matchesexport’s pre-flight check).InternalErrorwrapping the underlyingstd::io::Errorfor mkdir or write failures.
Returns the number of bytes written.
§Errors
- Returns
ErrorCode::PermissionDeniedifpathexists andoverwriteisfalse. - Returns
ErrorCode::InternalErrorwrapping the underlyingstd::io::Errorforcreate_dir_allorwritefailures.