[−][src]Function sgx_tstd::untrusted::fs::read_dir
pub fn read_dir<P: AsRef<Path>>(path: P) -> Result<ReadDir>
Returns an iterator over the entries within a directory.
The iterator will yield instances of io::Result
<
DirEntry
>
.
New errors may be encountered after an iterator is initially constructed.
Platform-specific behavior
This function currently corresponds to the opendir
function on Unix
and the FindFirstFile
function on Windows. Advancing the iterator
currently corresponds to readdir
on Unix and FindNextFile
on Windows.
Note that, this may change in the future.
The order in which this iterator returns entries is platform and filesystem dependent.
Errors
This function will return an error in the following situations, but is not limited to just these cases:
- The provided
path
doesn't exist. - The process lacks permissions to view the contents.
- The
path
points at a non-directory file.