(&self, path: impl AsRef<Path>)
| 142 | } |
| 143 | |
| 144 | pub async fn create_dir_all(&self, path: impl AsRef<Path>) -> io::Result<()> { |
| 145 | match self { |
| 146 | Self::Real => fs::create_dir_all(path).await, |
| 147 | Self::Chroot(root) => fs::create_dir_all(append(root.path(), path)).await, |
| 148 | Self::Fake(_) => Err(io::Error::other("unimplemented")), |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | /// Attempts to open a file in read-only mode. |
| 153 | /// |