HomeManualTopicsTypesSymbols

std::readdir

reads a directory entry

Parameter

dir
the directory stream

Result

entry: a directory entry

Description

On success a std_types::dirent is returned, on failure an appropriate error-object is returned.

This function needs I/O-access rights.

Example

opendir! $dir "/bin" loop: readdir! $entry dir if entry.is_an_error break : if type_of(entry) == SYMBOLIC_LINK: # check file type println! name_of(entry) next! next

Output

texosquery lzip-compressor a2ping ...

Topic

POSIX

See also

std::opendir opens a directory stream
std::closedir closes the specified directory stream
std_types::dirent a directory entry