Mana
Loading...
Searching...
No Matches
Functions
physfsrwops.h File Reference
#include "physfs.h"
#include "SDL.h"

Go to the source code of this file.

Functions

PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_openRead (const char *fname)
 Open a platform-independent filename for reading, and make it accessible via an SDL_RWops structure.
 
PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_openWrite (const char *fname)
 Open a platform-independent filename for writing, and make it accessible via an SDL_RWops structure.
 
PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_openAppend (const char *fname)
 Open a platform-independent filename for appending, and make it accessible via an SDL_RWops structure.
 
PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_makeRWops (PHYSFS_File *handle)
 Make a SDL_RWops from an existing PhysicsFS file handle.
 

Function Documentation

◆ PHYSFSRWOPS_makeRWops()

PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_makeRWops ( PHYSFS_File *  handle)

Make a SDL_RWops from an existing PhysicsFS file handle.

You should dispose of any references to the handle after successful creation of the RWops. The actual PhysicsFS handle will be destroyed when the RWops is closed.

Parameters
handlea valid PhysicsFS file handle.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 220 of file physfsrwops.c.

◆ PHYSFSRWOPS_openAppend()

PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_openAppend ( const char *  fname)

Open a platform-independent filename for appending, and make it accessible via an SDL_RWops structure.

The file will be closed in PhysicsFS when the RWops is closed. PhysicsFS should be configured to your liking before opening files through this method.

Parameters
filenameFile to open in platform-independent notation.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 244 of file physfsrwops.c.

◆ PHYSFSRWOPS_openRead()

PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_openRead ( const char *  fname)

Open a platform-independent filename for reading, and make it accessible via an SDL_RWops structure.

The file will be closed in PhysicsFS when the RWops is closed. PhysicsFS should be configured to your liking before opening files through this method.

Parameters
filenameFile to open in platform-independent notation.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 232 of file physfsrwops.c.

◆ PHYSFSRWOPS_openWrite()

PHYSFS_DECL SDL_RWops * PHYSFSRWOPS_openWrite ( const char *  fname)

Open a platform-independent filename for writing, and make it accessible via an SDL_RWops structure.

The file will be closed in PhysicsFS when the RWops is closed. PhysicsFS should be configured to your liking before opening files through this method.

Parameters
filenameFile to open in platform-independent notation.
Returns
A valid SDL_RWops structure on success, NULL on error. Specifics of the error can be gleaned from PHYSFS_getLastError().

Definition at line 238 of file physfsrwops.c.