Iso11783FSCloseFile
Valid for: CANoe DE • CANoe4SW DEFunction Syntax
Description
This function closes an opened file or directory.Parameters
- fileHandle: Handle of the file or directory, which was opened with Iso11783FSOpenFile.
long Iso11783FSCloseFile( dword fileHandle );
// handle references a file
LONG handle;
char data[200];
handle = Iso11783FSOpenFile( "\test.TXT", 0x00 );
if (handle > 0) {
Iso11783FSReadFile( handle, elCount(data), data );
Iso11783FSCloseFile( handle );
}
// handle references a directory
LONG dirHandle;
char data[200];
dirHandle = Iso11783FSOpenFile( "\dir1", 0x03 );
if (dirHandle > 0) {
Iso11783FSReadFile( dirHandle, (elCount(data)-2)/22, data);
Iso11783FSCloseFile( dirHandle );
}