Skip to content

FileIO

Navigation: SamplesCauldronMiscellaneous

FileIO

File read/write support for FidelityFX Cauldron Framework.

Functions

ReadFileAll

int64_t ReadFileAll(const wchar_t *fileName, void *buffer, size_t bufferLen)

Performs a full file read.

Returns: The number of bytes read.

Parameters:

  • fileName (const wchar_t *) – [in] The file to read.
  • buffer (void *) – [in] The buffer into which to copy read file data.
  • bufferLen (size_t) – [in] The amount of data to read.

Returns: int64_t

Source: framework/cauldron/framework/inc/misc/fileio.h (line 46, column 13)

ReadFilePartial

int64_t ReadFilePartial(const wchar_t *fileName, void *buffer, size_t bufferLen, int64_t readOffset=0)

Performs a partial file read.

Returns: The number of bytes read.

Parameters:

  • fileName (const wchar_t *) – [in] The file to read.
  • buffer (void *) – [in] The buffer into which to copy read file data.
  • bufferLen (size_t) – [in] The amount of data to read.
  • readOffset (int64_t) – [in] Offset in the file where to start reading.

Returns: int64_t

Source: framework/cauldron/framework/inc/misc/fileio.h (line 58, column 13)

GetFileSize

int64_t GetFileSize(const wchar_t *fileName)

Fetches the size (in bytes) of a file.

Returns: The number of bytes contained in the file.

Parameters:

  • fileName (const wchar_t *) – [in] The file whose size we are querying.

Returns: int64_t

Source: framework/cauldron/framework/inc/misc/fileio.h (line 67, column 13)

ParseJsonFile

bool ParseJsonFile(const wchar_t *fileName, json &jsonOut)

Helper to read and parse json files.

Returns: True if operation succeeded, false otherwise.

Parameters:

  • fileName (const wchar_t *) – [in] The json file to read and parse.
  • jsonOut (json &) – [out] The json data read from file.

Returns: bool

Source: framework/cauldron/framework/inc/misc/fileio.h (line 77, column 10)