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

Iso11783FSMakeAbsolutePath

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long Iso11783FSMakeAbsolutePath( char relPath[], char absPath[], dword mustExist, dword bufferSize, char buffer[] );
long Iso11783FSMakeAbsolutePath( char relPath[], char absPath[], dword mustExist, dword bufferSize, char buffer[], char volume[], long manufacturerCode );

Description

This function converts a relative path into an absolute path including a conversion to uppercase characters. An absolute path begins with \ and refers to the root directory (see also Iso11783SetPath). A relative path could contain .. and .. A path must follow the 8.3 format (8 character identifier with 4 character extension).

Parameters

  • relPath: Relative path which could contain .. and ..
  • absPath: Absolute path.
  • mustExist:
    • 1: check if path exists and return an error if the file does not exist.
    • 0: the path must not exist.
  • bufferSize: Size of buffer in byte.
  • buffer: New path is copied to this buffer.
  • volume: Name of the volume, this information and the manufacturer code are needed to resolve the root directory in the paths.
  • manufacturerCode: Manufacturer code, this information and the volume are needed to resolve the root directory in the paths.

Return Values

0 or error code

Example

char defaultDirectory[64] = "\IMPL";
char newPath[255];

if (Iso11783FSMakeAbsolutePath( "..\DATA", defaultDirectory, 1, elCount(newPath), newPath ) == 0) {
  write( "Path '%s'", newPath );
}