Isdirectory - Crestron SIMPL+ Reference Manual

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

Advertisement

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

IsDirectory

Name:
IsDirectory
Syntax:
INTEGER IsDirectory(FILE_INFO info)
Description:
This routine returns whether the specified file is a directory, equivalent to checking
info;Attributes.
Parameters:
INFO – structure containing the information about a found file (refer to "FindFirst"
on
page 149
for a description).
Return Value:
Returns 1 if file is a directory and 0 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 (IsDirectory(FileInfo))
PRINT( "%s is a directory\n", FileInfo.Name );
Found = FindNext(FileInfo);
}
IF ( FindClose() < 0 )
PRINT ( "Error in closing find operation\n" );
EndFileOperations();
Version:
SIMPL+ Version 3.0x (Pro 2 only)
Control System:
2-Series Only
Software
®
SIMPL+
153

Advertisement

Table of Contents
loading

Table of Contents