WoCheckFile Function

Confirms if a file is readable or writable.

Usage

status = WoCheckFile(file) 

Input Parameters

file — A string containing the name of the file to check.

Returned Value

status — If 1, the file can be used for the given operation; if 0, the file cannot be used.

Input Keywords

Read — If specified and nonzero, the function verifies that the file is readable.

Write — If specified and nonzero, the function verifies that the file is writable.

Output Keyword

FullName — Returns a string containing the expanded filename. Constructs like ~user and $ENV_VAR are expanded.

Size — Returns the size of the file in bytes.

Example

The following expression is used in the code for the VDA Tool WzExport to determine if a given file can be written to.

...
IF NOT WoCheckFile(file_name, /Write) THEN RETURN, '' 
...