ReadDirectory

Function ReadDirectory 

Source
pub fn ReadDirectory(
    Path: PathBuf,
) -> ActionEffect<Arc<dyn FileSystemReader>, CommonError, Vec<(String, FileTypeDTO)>>
Expand description

Creates an effect that, when executed, will read the entries of a directory at the specified path.

It uses the FileSystemReader capability from the environment to perform the actual file I/O.

§Parameters

  • Path: The PathBuf of the directory to read.

§Returns

An ActionEffect that resolves with a Vec of tuples, where each tuple contains the entry’s name (String) and its FileTypeDTO.