Filelength - Crestron SIMPL+ Reference Manual

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

Advertisement

Software
®
136
SIMPL+

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
Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading

Table of Contents