EasyManuals Logo

AMX NETLINX PROGRAMMING LANGUAGE User Manual

AMX NETLINX PROGRAMMING LANGUAGE
246 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #136 background imageLoading...
Page #136 background image
Reserved Identifiers
120
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
FILE_CLOSE This function closes a file opened with FILE_OPEN. This function should be
called when all reading or writing to the file is completed.
SLONG File_Close (LONG hFile)
Parameters:
• hFile: Handle to the file returned by File_Open.
Result:
• 0: Operation was successful
• -1: Invalid file handle
• -5: Disk I/O error
• -7: File already closed
There is a limit to the number of file handles available from the system. If files
are not closed, it may not be possible to open a file.
Result = File_Close(hFile)
FILE_COPY This function copies the specified file.
SLONG File_Copy(CHAR SrcFilePath[ ], CHAR DstFilePath[ ])
Parameters:
• SrcFilePath: Path name of the file to copy (source).
• DstFilePath: Path name of the copied file (destination).
Result:
• 0: Operation was successful
• -2: Invalid file name
• -5: Disk I/O error
• -11: Disk full
If either path name fails to specify a directory, the current directory is assumed.
The current directory is either the top-level directory or the subdirectory speci-
fied in the last call to File_SetDir.
// copy OLDFILE.TXT in the current directory to
NEWFILE.TXT
Result = File_Copy('OLDFILE.TXT', 'NEWFILE.TXT')
CHAR Buffer[1024]
SLONG NumFiles = 1
LONG Entry = 1
WHILE (NumFiles > 0)
{
NumFiles = FILE_DIR ('AAA:', Buffer, Entry)
Entry = Entry + 1
// add code to display contents of Buffer
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the AMX NETLINX PROGRAMMING LANGUAGE and is the answer not in the manual?

AMX NETLINX PROGRAMMING LANGUAGE Specifications

General IconGeneral
BrandAMX
ModelNETLINX PROGRAMMING LANGUAGE
CategorySoftware
LanguageEnglish

Related product manuals