
Reserved Identifiers
121
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
FILE_CREATEDIR
Creates a specified directory path.
Syntax:
SLONG File_CreateDir (CHAR DirPath[ ])
This function will not create the number of subdirectories needed to complete
the directory path if they do not exist. The subdirectories must be created one
level at a time.
Note
: The LONG command cannot pass negative numbers, so if you have
errors these will never be recognized. SLONG must be assigned or errors will
be typecast to positive numbers.
Parameters:
•
DirPath
- string containing the directory path to create.
Result:
• 0 = operation was successful
• -4 = invalid directory path
• -5 = disk I/O error
• -13 = directory name exists
Example:
File_CreateDir('\CDLIST\')
File_CreateDir('\CDLIST\TEMP\')
Creates both
\CDLIST
and
\CDLIST\TEMP
subdirectories.
FILE_DELETE
This function deletes the specified files.
SLONG FILE_DELETE (CHAR FilePath[ ])
Parameters:
•
FilePath
: Path name of the file to delete.
Result:
• 0: Operation was successful
• -2: Invalid file path or name
• -5: Disk I/O error
// delete all files in the directory \CDLIST\TEMP\Result =
File_Delete('\CDLIST\TEMP\')
FILE_DIR
This function returns a list of files located at the specified path. The syntax:
SLONG FILE_DIR (CHAR DirPath[ ], CHAR Buffer[ ], LONG
Entry)
Parameters:
•
DirPath
: String containing the path to the requested directory.
•
Buffer
: Buffer to hold the directory list.
•
Entry
: Requested directory entry.
This function returns the number of remaining files in the directory, or:
• -4: Invalid directory path
• -5: Disk I/O error
• -6: Invalid parameter (i.e. Entry points beyond the end of the directory, or is 0)
• -10: Buffer too small
• -12: Directory not loaded
Note
: The
LONG
command cannot pass negative numbers, so if you have errors
these will never be recognized.
SLONG
must be assigned or errors will be type-
cast to positive numbers.
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...