Index       File system

trap_FS_FOpenFile

Description

Open a file for I/O.

Prototype

    int trap_FS_FOpenFile(
        const char *qpath,
        fileHandle_t *f,
        fsMode_t mode
    );

Parameters

Remarks

This opens a file specified by the string qpath and allocates a fileHandle_t (just a typedef int) to that file.
This is then used in subsequent operations involving the file. The fsMode_t enumeration refers to the mode the file is opened in.
An int is returned representing the length of the file being opened.

Return value

Returns a handle to the file, or 0 on error.

See also

Author(s)

Timbo


QuakeIII trap calls reference