Returns a stream over the entries within a directory. This is a proxy to [`tokio::fs::read_dir`].
(&self, path: impl AsRef<Path>)
| 398 | /// |
| 399 | /// This is a proxy to [`tokio::fs::read_dir`]. |
| 400 | pub async fn read_dir(&self, path: impl AsRef<Path>) -> Result<fs::ReadDir, io::Error> { |
| 401 | match self { |
| 402 | Self::Real => fs::read_dir(path).await, |
| 403 | Self::Chroot(root) => fs::read_dir(append(root.path(), path)).await, |
| 404 | Self::Fake(_) => panic!("unimplemented"), |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | /// Returns the canonical, absolute form of a path with all intermediate |
| 409 | /// components normalized and symbolic links resolved. |