25.134. OPEN DIRECTORY dir_name PATTERN pattern OPTION option AS dn

[<<<] [>>>]

Open a directory to retrieve the list of files.

Note that this command can execute for a long time and consuming a lot of memory especially when directory listing is requested recursively. When the command is executed it collects the names of the files in the directory or directories as requested and builds up an internal list of the file names in the memory. The command NEXTFILE uses the list to retrieve the next file name from the list.

This implies to facts:

Using a directory number that was already used and not released calling CLOSEDIR raises an error.

If the list of the files in the directory can not be collected the command raises error.

See also CLOSEDIR and NEXTFILE.


[<<<] [>>>]