Open dir

Purpose: Open directory to obtain all files and subdirectories in it.

open-dir <path> dir-id <dir id> \
    [ status <status> ]

Prepare ("open") directory <path> for reading, i.e. to obtain all the files and subdirectories under <path>, which is either an absolute path to the directory or a path relative to the current working directory (which by default is the application home directory, see directories).

The result is <dir id> in "dir-id" clause (a directory stream variable), which is used in read-dir to obtain the contents of <path> (i.e. all the files and subdirectories), as well as in close-dir.

The <status> (in "status" clause) can be RIM_OKAY if <path> is ready for reading, or RIM_ERR_OPEN if cannot open <path> (in which case you can use "errno" clause in get-req to find the specific reason why).
Examples
See read-dir.
See also
Directories
change-dir  
change-mode  
close-dir  
delete-dir  
directories  
new-dir  
open-dir  
read-dir  
See all
documentation


Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.