Gambas Documentation - /dev/api/name/gb.realfilename

/dev/api/name/gb.realfilename

# GB.RealFileName

char *GB.RealFileName ( char *path , long len )

Converts a file path from UTF-8 charset to system charset and returns it. Creates a temporary copy of the file if path is not a real file.

- path is the file path.

- len is the file path length.

If path is relative, i.e. if the file is located in the project or in the current component, then creates a temporary copy of this file and returns its path instead.

If path is absolute, then this function has the same behaviour than `GB.FileName`.

This function is useful when you have to use a function that needs a path that points at a real file, and you do not have any equivalent that could take the address of the loaded file in memory.

The temporary files are automatically deleted when the interpreter exits.

### See also

- /wiki/api/cat/file