Get file read-only attribute

Command groupFlag affectedReversibleExecute on clientPlatform(s)
External commandsYESNONOWindows,Linux

Syntax

Get file read-only attribute
 
(path, read-flag)
 
Returns 
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
,
lFileAttribute
)
 
Returns 
lErrCode