Reads directory and returns a vector of directory entries.
(path: &Path)
| 534 | |
| 535 | /// Reads directory and returns a vector of directory entries. |
| 536 | pub async fn read_dir(path: &Path) -> Result<Vec<fs::DirEntry>> { |
| 537 | let res = tokio_stream::wrappers::ReadDirStream::new(fs::read_dir(path).await?) |
| 538 | .try_collect() |
| 539 | .await?; |
| 540 | Ok(res) |
| 541 | } |
| 542 | |
| 543 | pub(crate) fn time() -> i64 { |
| 544 | SystemTime::now() |
no outgoing calls