Skip to main content

fs_create_dir

Function fs_create_dir 

Source
pub fn fs_create_dir(path: &Path) -> Result<(), FpgadError>
Expand description

Recursively create directories up to the specified path.

This is a convenient wrapper around std::fs::create_dir_all that provides trace logging and automatic error conversion to FpgadError::IOCreate. It will create all missing parent directories in the path.

§Arguments

  • path - The directory path to create (including all parents)

§Returns: Result<(), FpgadError>

  • Ok(()) - Directory created (or already existed)
  • Err(FpgadError::IOCreate) - If directory creation fails (permissions, etc.)

§Examples

// Create nested directories
fs_create_dir(Path::new("/sys/kernel/config/device-tree/overlays/my_overlay"))?;