FileOps.$setfileinfo()

Function group Execute on client Platform(s)
FileOps NO All

Syntax

FileOps.$setfileinfo(cPath,iInformationFlag,vInfoValue,...)

Description

Sets file information for the file named cPath. Pathnames can be over 255 characters, which was the limit in Studio 8.0.1 or earlier.

You can use $setfileinfo() to change the read-only and hidden status of a file. You pass the relevant kFileOpsInfo... constant in iInfoFlag, and the new value in vInfoSetting. If desired, you can then pass the other constant and its new value in the next two parameters. The function returns an error code, or zero if successful: see the FileOps function error codes.

Example

Do  FileOps.$setfileinfo('c:\omnis\meths.txt',kFileOpsInfoReadOnly,kTrue,kFileOpsInfoHidden,kFalseReturns lError
# sets the file 'meths.txt' to be read-only and not hidden