Skip to main content

validate_mount_path

Function validate_mount_path 

Source
pub fn validate_mount_path(path: &Path) -> Result<PathBuf, MountError>
Expand description

Validate that a mount host path exists and is accessible.

Checks:

  1. Path is absolute.
  2. Path exists (via canonicalize, which also resolves symlinks).
  3. Path is a directory.

§Arguments

  • path - The path to validate.

§Returns

  • Ok(PathBuf) - The canonical (resolved) path.
  • Err(MountError) - Validation error.