Function sys_mount::scoped_mount

source ·
pub fn scoped_mount<T, S: FnOnce() -> T>(
    source: &Path,
    mount_at: &Path,
    scope: S
) -> Result<T, ScopedMountError>
Expand description

Mount a partition temporarily for the duration of the scoped block within.

§Errors

  • Fails if the supported file systems cannot be found.
  • Or if it fails to unmount