PING
0.9
Statistical data handling and processing in production environment
|
Check the existence of a directory.
dir
: a full path directory;mdkir
: (option) boolean flag (yes/no
) set to force the creation of the directory when it does not already exist.ans
: error code for the test of prior existence of the input directory (hence, independent of the mkdir
option), i.e.:
0
when the directory exists (and can be opened), or1
(error) when the directory does not exist, or-1
(error) when the fileref exists but cannot be opened as a directory.Just try on your "root" path, so that:
will return ans=0
.
Run macro %_example_dir_check
for more examples.
The response and
returned by the macro relates to the prior existence of the directory. Therefore, even when a directory is created thanks to the option mkdir=YES
, the answer may be ans=0
.
%ds_check, %lib_check, %file_check, FEXIST, FILENAME, DOPEN.