Get file read-only attribute

Command group Flag affected Reversible Execute on client Platform(s)
External commands YES NO NO Windows,Linux

Syntax

Get file read-only attribute (pathread-flagReturns err-code

Description

Note: The flag is set according to whether Omnis was able to make a call to this external command.

This command returns the current read-only attribute of the file specified in path. If the read-flag parameter returns kTrue the file is read-only, otherwise if kFalse is returned the file is read/write.

It returns an error code (See Error Codes), or zero if no error occurs.

Example

# returns the read-only attribute of the omnis.exe in the omnis tree
Calculate lFileName as con(sys(115),'omnis.exe')
Get file read-only attribute (lFileName,lFileAttributeReturns lErrCode