HomeManualTopicsTypesSymbols
std::opendir
opens a directory stream
Parameter
- pathname
- the path of the directory to open
Result
- dir: a directory stream
Description
On success a std_types::directory 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