Method
mount
(&mut self, fstype: &str, target: &Path, options: &str)
Source from the content-addressed store, hash-verified
| 402 | struct Mounts(Vec<PathBuf>); |
| 403 | impl Mounts { |
| 404 | fn mount(&mut self, fstype: &str, target: &Path, options: &str) { |
| 405 | run_with_sudo( |
| 406 | "mount", |
| 407 | [ |
| 408 | "-t".as_ref(), |
| 409 | fstype.as_ref(), |
| 410 | "-o".as_ref(), |
| 411 | options.as_ref(), |
| 412 | fstype.as_ref(), |
| 413 | target.as_os_str(), |
| 414 | ], |
| 415 | ) |
| 416 | .unwrap_or_else(|e| panic!("mount {fstype} on {target:?}: {e}")); |
| 417 | self.0.push(target.to_path_buf()); |
| 418 | } |
| 419 | } |
| 420 | impl Drop for Mounts { |
| 421 | fn drop(&mut self) { |