Skip to main content
Open topic with navigation CAPL Functions » ISO11783 » ISO11783 Node Layer » iso11783FSOpenFile

iso11783FSOpenFile

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long iso11783FSOpenFile( char path[], dword flags );

Description

This function opens a file or directory.

Parameters

  • path: absolute path of the file
  • flags: options to open the file
    • Bit 1-2
      • 0: Read only
      • 1: Write only
      • 2: Read and write
      • 3: Open directory for reading
    • Bit 3
      • 0: Open an existing file or directory
      • 1: Create a new file or directory if not yet existing
    • Bit 4
      • 0: Random access
      • 1: Append
    • Bit 5
      • 0: Shared access
      • 1: Exclusive access

Return Values

Example

LONG handle;
char data[200];

handle = iso11783FSOpenFile("\test.TXT", 0x00);
if (handle > 0) {
  Iso11783FSReadData(handle, elCount(data), data);
  Iso11783FSCloseFile(handle);
}