IFS File Access (IFSACCESS) UDF

Index

Schema IQUERY

IFSACCESS( path_name => 'IFS file name', mode => 0 or 'access-mode' )

The IFS Access (IFSACCESS) User Defined Function returns 1 (true) if the file is found for the given mode, or 0 (false) if it is not.
The IFSACCESS() UDF runs the access() C runtime function to generate the result.

Parameters

PATH_NAME

The path name and file whose access is tested.

MODE

Default: F_OK
The access mode being tested. Valid choices are:

Examples

Check if the file /home/bob/NEWORDER.CSV exists and the caller has Read/Write/Execute authority:

values iQuery.IFSAccess( path_name => '/home/bob/newOrder.csv', mode=>'rwx_ok' ) into :Available;

To simply check if the IFS File exists, specify only the IFS file name on the path_name parameter.

values iQuery.IFSAccess( path_name => '/home/bob/newOrder.csv' ) into :Exists;

Return Value

1 if the file exists for the specified access mode, otherwise 0 is returned.