
PT-20 Programming Guide
-1 : path error.
-2 : disk unformat.
upward 0 : When pssBuffer = NULL, it will return buffer size. When
pssBuffer != NULL, it will return folder quantity.
Get the file information in designate path.
int getFileList(char *pssPath, char *pssBuffer);
int File_Num;
char assBuffer[200];
File_Num = getFileList(“D:\\Lookup\\”, assBuffer);
The getFileList function can get the file quantity and name in designate
path.
When pssBuffer = NULL, this function will return the buffer size.
For example, the path “C:\Data\” has two files “StoreIn.dat”,
“StoreOut.dat”, and their size are 1128 bytes and 564 bytes, then the
buffer will get file information like “StoreIn.dat dat 1128 StoreOut.dat dat
564 “.
-1 : path error.
-2 : disk unformat.
upward 0 : When pssBuffer = NULL, it will return buffer size. When
pssBuffer != NULL, it will return file quantity.
Use _fclose to close a file opened earlier for buffered input/output using
_fopen.
int _fclose(_TFILE *file_pointer);
The _fclose function closes the file specified by the argument file_pointer.
This pointer must have been one returned earlier when the file was opened
by _fopen. If the file is opened for writing, the contens of the buffer
associated with the file are flushed before the file is closed. The buffer is
then released.
If the file is successfully closed, _fclose returns a zero. In case of an error,
the return value is equal to the constant EOF.
Kommentare zu diesen Handbüchern