UbiQ Scenario Manager User Manual
64
5.2.7
eof
Syntax
int eof(int hFile)
Parameters
hFile: Specifies the handle referring to open file
Description
This function returns whether or not the current file position is the end-of-file. If
the handle is invalid, or the file is not open for reading, or the file is locked, the
function returns -1.
Example
int hFile;
hFile=open(“\\flash storage\\template.txt”, FILE_CREATE_RW);
setdebug(TRUE);
if (hFile==0) {
debug(“Open file failed!”);
}
else {
// process the file
readln(hFile, data);
while (!eof(hFile)) {
readln(hFile,data);
}
close(hFile); // close the file
}
See Also
open, close, read, write, seek, readln, writeln, filecopy
5.2.8
filecopy
Syntax
int filcopy(char* pSrc,char *pDest) or
int filcopy(string sSrc, string sDest)
Parameters
pSrc: Specifies the source filename array
pDest: Specifies the destination filename array
sSrc: Specifies the source filename string
sDest: Specifies the destination filename string
Description
This function returns the result of copying source file to destination file. If it suc-
cesses, returns TRUE; otherwise returns FALSE.
Example
ilecopy(“\\flash storage\\program.c1”,”\\flash storage\\program.cgi”);
See Also
open, close, read, write, seek, readln, writeln, eof
Summary of Contents for UbiQ
Page 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Page 4: ...UbiQ Scenario Manager User Manual iv...
Page 7: ...Chapter 1 1 Introduction...
Page 13: ...Chapter 2 2 Getting Started...
Page 37: ...Chapter 3 3 Tutorials...
Page 47: ...Chapter 4 4 Basic of Smart C Script Language...
Page 62: ...UbiQ Scenario Manager User Manual 56...