Isreadonly - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

IsReadOnly

Name:
IsReadOnly
Syntax:
INTEGER IsReadOnly(FILE_INFO info)
Description:
This routine returns whether the specified file is marked as read-only. Equivalent to
checking attributes in FILE_INFO. Refer to
Parameters:
INFO – structure containing the information about a found file (refer to "FindFirst"
on page
149
for description).
Return Value:
Returns 1 if file is read-only and 0 if otherwise.
Example:
(Refer to "File Functions Overview"on page 116)
FILE_INFO FileInfo;
SIGNED_INTEGER Found;
StartFileOperations();
Found = FindFirst("*.dat", FileInfo );
WHILE (Found = 0)
{
if (IsReadOnly(FileInfo))
PRINT( "%s is read-only\n", FileInfo.Name );
Found = FindNext(FileInfo);
}
IF ( FindClose() < 0 )
PRINT ( "Error in closing find operation\n" );
EndFileOperations();
Version:
SIMPL+ Version 3.00.02 or higher (Pro 2 only)
Control System:
2-Series Only
page
135.
SIMPL+
Software
®
155

Advertisement

Table of Contents
loading

Table of Contents