Create a new `FileSystem` rooted at the given path. The path does not need to exist yet, but operations will fail if the root directory is not present when needed.
(root: P)
| 50 | /// The path does not need to exist yet, but operations will fail |
| 51 | /// if the root directory is not present when needed. |
| 52 | pub fn from_root<P: AsRef<Path>>(root: P) -> Self { |
| 53 | Self { |
| 54 | root: root.as_ref().to_path_buf(), |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | /// Get the root directory path. |
| 59 | pub fn root(&self) -> &Path { |