EasyManua.ls Logo

Crestron SIMPL+ - FileLength Function

Crestron SIMPL+
374 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Software Crestron SIMPL+
®
136 z SIMPL+
®
Language Reference Guide - DOC. 5797G
FileLength
Name:
FileLength
Syntax:
LONG_INTEGER FileLength (INTEGER handle)
Description:
Returns the length of a file.
Parameters:
HANDLE specifies the file handle of the previously opened file (from FileOpen).
Return Value:
Number of bytes if successful. Otherwise, file error code is returned.
Example:
(Refer to "File Functions Overview"on page 116)
SIGNED_INTEGER nFileHandle;
StartFileOperations();
nFileHandle = FileOpen ( “MyFile”, _O_RDONLY );
IF (nFileHandle < 0)
{
PRINT(“Error Opening File MyFile\n”);
return;
}
IF ( nFileHandle > 0 )
PRINT ( “Length of file = %d\n”,
FileLength ( nFileHandle ) );
IF ( FileClose ( nFileHandle ) <> 0 )
PRINT ( “Error closing file\n” );
EndFileOperations();
Version:
SIMPL+ Version 3.00.02 or higher (Pro 2 only)
Control System:
2-Series Only

Table of Contents

Other manuals for Crestron SIMPL+

Related product manuals