FileIO

File read/write support for FidelityFX Cauldron Framework.

Functions

Return type

Description

int64_t

cauldron::ReadFileAll (const wchar_t* fileName, void* buffer, size_t bufferLen)
Performs a full file read.

int64_t

cauldron::ReadFilePartial ( const wchar_t* fileName, void* buffer, size_t bufferLen, int64_t readOffset = 0 )
Performs a partial file read.

int64_t

cauldron::GetFileSize (const wchar_t* fileName)
Fetches the size (in bytes) of a file.

bool

cauldron::ParseJsonFile (const wchar_t* fileName, json& jsonOut)
Helper to read and parse json files.

Detailed description

File read/write support for FidelityFX Cauldron Framework.

Global functions

ReadFileAll

Copied!

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

Performs a full file read.

Parameters:

fileName

The file to read.

buffer

The buffer into which to copy read file data.

bufferLen

The amount of data to read.

Returns:

The number of bytes read.


ReadFilePartial

Copied!

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

Performs a partial file read.

Parameters:

fileName

The file to read.

buffer

The buffer into which to copy read file data.

bufferLen

The amount of data to read.

readOffset

Offset in the file where to start reading.

Returns:

The number of bytes read.


GetFileSize

Copied!

int64_t cauldron::GetFileSize (const wchar_t* fileName)

Fetches the size (in bytes) of a file.

Parameters:

fileName

The file whose size we are querying.

Returns:

The number of bytes contained in the file.


ParseJsonFile

Copied!

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

Helper to read and parse json files.

Parameters:

fileName

The json file to read and parse.

jsonOut

The json data read from file.

Returns:

True if operation succeeded, false otherwise.


Related pages

  • Visit the FidelityFX SDK product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNAâ„¢ 2 GPUs, AMD Ryzenâ„¢ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!