>>-opendir--pathname-------------------------------------------><
Function
opendir invokes the opendir callable service to open a
directory stream so that it can be read by rddir. The file descriptor
is returned in RETVAL.
Parameters
- pathname
- A pathname for the directory.
Usage notes
- You can use opendir and closedir together with
the rddir syscall command, but not with the readdir command.
The rddir command reads a directory in the readdir callable
service format. Alternatively, you can simply use the readdir syscall
command to read an entire directory and format it in a stem.
- The opendir service opens a directory so that the first rddir
service (see rddir) starts reading at the first entry
in the directory.
- RETVAL is a file descriptor for a directory only. It can be used
only as input to services that expect a directory file descriptor.
These services are closedir, rewinddir, and rddir.
Example
To open the directory
/u/edman:
"opendir /u/edman"