Add documentation

This commit is contained in:
link2xt
2023-01-27 23:09:26 +00:00
parent 7d3a591139
commit ae564ef702
9 changed files with 111 additions and 8 deletions

View File

@@ -511,6 +511,7 @@ pub fn open_file_std<P: AsRef<std::path::Path>>(
}
}
/// Reads directory and returns a vector of directory entries.
pub async fn read_dir(path: &Path) -> Result<Vec<fs::DirEntry>> {
let res = tokio_stream::wrappers::ReadDirStream::new(fs::read_dir(path).await?)
.try_collect()