physfs.h
Go to the documentation of this file.
#ifndef _INCLUDE_PHYSFS_H_
#define _INCLUDE_PHYSFS_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#if (defined _MSC_VER)
#define __EXPORT__ __declspec(dllexport)
#elif (__GNUC__ >= 3)
#define __EXPORT__ __attribute__((visibility("default")))
#else
#define __EXPORT__
#endif
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
typedef unsigned char PHYSFS_uint8;
typedef signed char PHYSFS_sint8;
typedef unsigned short PHYSFS_uint16;
typedef signed short PHYSFS_sint16;
typedef unsigned int PHYSFS_uint32;
typedef signed int PHYSFS_sint32;
#if (defined PHYSFS_NO_64BIT_SUPPORT) /* oh well. */
typedef PHYSFS_uint32 PHYSFS_uint64;
typedef PHYSFS_sint32 PHYSFS_sint64;
#elif (defined _MSC_VER)
typedef signed __int64 PHYSFS_sint64;
typedef unsigned __int64 PHYSFS_uint64;
#else
typedef unsigned long long PHYSFS_uint64;
typedef signed long long PHYSFS_sint64;
#endif
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
/* Make sure the types really have the right sizes */
#define PHYSFS_COMPILE_TIME_ASSERT(name, x) \
typedef int PHYSFS_dummy_ ## name[(x) * 2 - 1]
PHYSFS_COMPILE_TIME_ASSERT(uint8, sizeof(PHYSFS_uint8) == 1);
PHYSFS_COMPILE_TIME_ASSERT(sint8, sizeof(PHYSFS_sint8) == 1);
PHYSFS_COMPILE_TIME_ASSERT(uint16, sizeof(PHYSFS_uint16) == 2);
PHYSFS_COMPILE_TIME_ASSERT(sint16, sizeof(PHYSFS_sint16) == 2);
PHYSFS_COMPILE_TIME_ASSERT(uint32, sizeof(PHYSFS_uint32) == 4);
PHYSFS_COMPILE_TIME_ASSERT(sint32, sizeof(PHYSFS_sint32) == 4);
#ifndef PHYSFS_NO_64BIT_SUPPORT
PHYSFS_COMPILE_TIME_ASSERT(uint64, sizeof(PHYSFS_uint64) == 8);
PHYSFS_COMPILE_TIME_ASSERT(sint64, sizeof(PHYSFS_sint64) == 8);
#endif
#undef PHYSFS_COMPILE_TIME_ASSERT
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
typedef struct PHYSFS_File
{
void *opaque;
} PHYSFS_File;
#define PHYSFS_file PHYSFS_File
typedef struct PHYSFS_ArchiveInfo
{
const char *extension;
const char *description;
const char *author;
const char *url;
} PHYSFS_ArchiveInfo;
typedef struct PHYSFS_Version
{
PHYSFS_uint8 major;
PHYSFS_uint8 minor;
PHYSFS_uint8 patch;
} PHYSFS_Version;
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
#define PHYSFS_VER_MAJOR 2
#define PHYSFS_VER_MINOR 0
#define PHYSFS_VER_PATCH 3
#endif /* DOXYGEN_SHOULD_IGNORE_THIS */
/* PhysicsFS state stuff ... */
#define PHYSFS_VERSION(x) \
{ \
(x)->major = PHYSFS_VER_MAJOR; \
(x)->minor = PHYSFS_VER_MINOR; \
(x)->patch = PHYSFS_VER_PATCH; \
}
__EXPORT__ void PHYSFS_getLinkedVersion(PHYSFS_Version *ver);
__EXPORT__ int PHYSFS_init(const char *argv0);
__EXPORT__ int PHYSFS_deinit(void);
__EXPORT__ const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void);
__EXPORT__ void PHYSFS_freeList(void *listVar);
__EXPORT__ const char *PHYSFS_getLastError(void);
__EXPORT__ const char *PHYSFS_getDirSeparator(void);
__EXPORT__ void PHYSFS_permitSymbolicLinks(int allow);
/* !!! FIXME: const this? */
__EXPORT__ char **PHYSFS_getCdRomDirs(void);
__EXPORT__ const char *PHYSFS_getBaseDir(void);
__EXPORT__ const char *PHYSFS_getUserDir(void);
__EXPORT__ const char *PHYSFS_getWriteDir(void);
__EXPORT__ int PHYSFS_setWriteDir(const char *newDir);
__EXPORT__ int PHYSFS_addToSearchPath(const char *newDir, int appendToPath);
__EXPORT__ int PHYSFS_removeFromSearchPath(const char *oldDir);
__EXPORT__ char **PHYSFS_getSearchPath(void);
__EXPORT__ int PHYSFS_setSaneConfig(const char *organization,
const char *appName,
const char *archiveExt,
int includeCdRoms,
int archivesFirst);
/* Directory management stuff ... */
__EXPORT__ int PHYSFS_mkdir(const char *dirName);
__EXPORT__ int PHYSFS_delete(const char *filename);
__EXPORT__ const char *PHYSFS_getRealDir(const char *filename);
__EXPORT__ char **PHYSFS_enumerateFiles(const char *dir);
__EXPORT__ int PHYSFS_exists(const char *fname);
__EXPORT__ int PHYSFS_isDirectory(const char *fname);
__EXPORT__ int PHYSFS_isSymbolicLink(const char *fname);
__EXPORT__ PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename);
/* i/o stuff... */
__EXPORT__ PHYSFS_File *PHYSFS_openWrite(const char *filename);
__EXPORT__ PHYSFS_File *PHYSFS_openAppend(const char *filename);
__EXPORT__ PHYSFS_File *PHYSFS_openRead(const char *filename);
__EXPORT__ int PHYSFS_close(PHYSFS_File *handle);
__EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle,
void *buffer,
PHYSFS_uint32 objSize,
PHYSFS_uint32 objCount);
__EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle,
const void *buffer,
PHYSFS_uint32 objSize,
PHYSFS_uint32 objCount);
/* File position stuff... */
__EXPORT__ int PHYSFS_eof(PHYSFS_File *handle);
__EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle);
__EXPORT__ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos);
__EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle);
/* Buffering stuff... */
__EXPORT__ int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize);
__EXPORT__ int PHYSFS_flush(PHYSFS_File *handle);
/* Byteorder stuff... */
__EXPORT__ PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val);
__EXPORT__ PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val);
__EXPORT__ PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val);
__EXPORT__ PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val);
__EXPORT__ PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val);
__EXPORT__ PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val);
__EXPORT__ PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val);
__EXPORT__ PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val);
__EXPORT__ PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val);
__EXPORT__ PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val);
__EXPORT__ PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val);
__EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
__EXPORT__ int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val);
__EXPORT__ int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val);
__EXPORT__ int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val);
__EXPORT__ int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val);
__EXPORT__ int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val);
__EXPORT__ int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val);
__EXPORT__ int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val);
__EXPORT__ int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val);
__EXPORT__ int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val);
__EXPORT__ int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val);
__EXPORT__ int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val);
__EXPORT__ int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val);
__EXPORT__ int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val);
__EXPORT__ int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val);
__EXPORT__ int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val);
__EXPORT__ int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val);
__EXPORT__ int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val);
__EXPORT__ int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val);
__EXPORT__ int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val);
__EXPORT__ int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val);
__EXPORT__ int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val);
__EXPORT__ int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val);
__EXPORT__ int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val);
__EXPORT__ int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val);
/* Everything above this line is part of the PhysicsFS 1.0 API. */
__EXPORT__ int PHYSFS_isInit(void);
__EXPORT__ int PHYSFS_symbolicLinksPermitted(void);
typedef struct PHYSFS_Allocator
{
int (*Init)(void);
void (*Deinit)(void);
void *(*Malloc)(PHYSFS_uint64);
void *(*Realloc)(void *, PHYSFS_uint64);
void (*Free)(void *);
} PHYSFS_Allocator;
__EXPORT__ int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator);
__EXPORT__ int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath);
__EXPORT__ const char *PHYSFS_getMountPoint(const char *dir);
typedef void (*PHYSFS_StringCallback)(void *data, const char *str);
typedef void (*PHYSFS_EnumFilesCallback)(void *data, const char *origdir,
const char *fname);
__EXPORT__ void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d);
__EXPORT__ void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d);
__EXPORT__ void PHYSFS_enumerateFilesCallback(const char *dir,
PHYSFS_EnumFilesCallback c,
void *d);
__EXPORT__ void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst,
PHYSFS_uint64 len);
__EXPORT__ void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst,
PHYSFS_uint64 len);
__EXPORT__ void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst,
PHYSFS_uint64 len);
__EXPORT__ void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst,
PHYSFS_uint64 len);
__EXPORT__ void PHYSFS_utf8FromLatin1(const char *src, char *dst,
PHYSFS_uint64 len);
/* Everything above this line is part of the PhysicsFS 2.0 API. */
#ifdef __cplusplus
}
#endif
#endif /* !defined _INCLUDE_PHYSFS_H_ */
/* end of physfs.h ... */
PHYSFS_writeSLE16
int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val)
Convert and write a signed 16-bit littleendian value.
PHYSFS_writeUBE64
int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val)
Convert and write an unsigned 64-bit bigendian value.
PHYSFS_enumerateFilesCallback
void PHYSFS_enumerateFilesCallback(const char *dir, PHYSFS_EnumFilesCallback c, void *d)
Get a file listing of a search path's directory, using an application-defined callback.
PHYSFS_write
PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle, const void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
Write data to a PhysicsFS filehandle.
PHYSFS_isInit
int PHYSFS_isInit(void)
Determine if the PhysicsFS library is initialized.
PHYSFS_readSBE64
int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val)
Read and convert a signed 64-bit bigendian value.
PHYSFS_openRead
PHYSFS_File * PHYSFS_openRead(const char *filename)
Open a file for reading.
PHYSFS_swapULE64
PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val)
Swap littleendian unsigned 64 to platform's native byte order.
PHYSFS_mount
int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath)
Add an archive or directory to the search path.
PHYSFS_getRealDir
const char * PHYSFS_getRealDir(const char *filename)
Figure out where in the search path a file resides.
PHYSFS_getUserDir
const char * PHYSFS_getUserDir(void)
Get the path where user's home directory resides.
PHYSFS_isDirectory
int PHYSFS_isDirectory(const char *fname)
Determine if a file in the search path is really a directory.
PHYSFS_ArchiveInfo::url
const char * url
Definition: physfs.h:381
PHYSFS_readULE64
int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val)
Read and convert an unsigned 64-bit littleendian value.
PHYSFS_getLastError
const char * PHYSFS_getLastError(void)
Get human-readable error information.
PHYSFS_ArchiveInfo::extension
const char * extension
Definition: physfs.h:378
PHYSFS_swapULE32
PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val)
Swap littleendian unsigned 32 to platform's native byte order.
PHYSFS_swapUBE32
PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val)
Swap bigendian unsigned 32 to platform's native byte order.
PHYSFS_writeUBE16
int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val)
Convert and write an unsigned 16-bit bigendian value.
PHYSFS_StringCallback
void(* PHYSFS_StringCallback)(void *data, const char *str)
Function signature for callbacks that report strings.
Definition: physfs.h:2112
PHYSFS_Version
Information the version of PhysicsFS in use.
Definition: physfs.h:398
PHYSFS_writeULE16
int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val)
Convert and write an unsigned 16-bit littleendian value.
PHYSFS_uint16
unsigned short PHYSFS_uint16
An unsigned, 16-bit integer type.
Definition: physfs.h:249
PHYSFS_seek
int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos)
Seek to a new position within a PhysicsFS filehandle.
PHYSFS_sint64
signed long long PHYSFS_sint64
A signed, 64-bit integer type.
Definition: physfs.h:292
PHYSFS_openWrite
PHYSFS_File * PHYSFS_openWrite(const char *filename)
Open a file for writing.
PHYSFS_swapSLE64
PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val)
Swap littleendian signed 64 to platform's native byte order.
PHYSFS_swapSBE32
PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val)
Swap bigendian signed 32 to platform's native byte order.
PHYSFS_readUBE32
int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val)
Read and convert an unsigned 32-bit bigendian value.
PHYSFS_swapSBE64
PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val)
Swap bigendian signed 64 to platform's native byte order.
PHYSFS_uint64
unsigned long long PHYSFS_uint64
An unsigned, 64-bit integer type.
Definition: physfs.h:291
PHYSFS_readULE16
int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val)
Read and convert an unsigned 16-bit littleendian value.
PHYSFS_Version::major
PHYSFS_uint8 major
Definition: physfs.h:400
PHYSFS_utf8FromLatin1
void PHYSFS_utf8FromLatin1(const char *src, char *dst, PHYSFS_uint64 len)
Convert a UTF-8 string to a Latin1 string.
PHYSFS_getDirSeparator
const char * PHYSFS_getDirSeparator(void)
Get platform-dependent dir separator string.
PHYSFS_getLinkedVersion
void PHYSFS_getLinkedVersion(PHYSFS_Version *ver)
Get the version of PhysicsFS that is linked against your program.
PHYSFS_writeSBE32
int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val)
Convert and write a signed 32-bit bigendian value.
PHYSFS_readSBE32
int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val)
Read and convert a signed 32-bit bigendian value.
PHYSFS_flush
int PHYSFS_flush(PHYSFS_File *handle)
Flush a buffered PhysicsFS file handle.
PHYSFS_Version::minor
PHYSFS_uint8 minor
Definition: physfs.h:401
PHYSFS_removeFromSearchPath
int PHYSFS_removeFromSearchPath(const char *oldDir)
Remove a directory or archive from the search path.
PHYSFS_exists
int PHYSFS_exists(const char *fname)
Determine if a file exists in the search path.
PHYSFS_fileLength
PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle)
Get total length of a file in bytes.
PHYSFS_setAllocator
int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator)
Hook your own allocation routines into PhysicsFS.
PHYSFS_utf8ToUcs2
void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len)
Convert a UTF-8 string to a UCS-2 string.
PHYSFS_swapUBE64
PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val)
Swap bigendian unsigned 64 to platform's native byte order.
PHYSFS_Version::patch
PHYSFS_uint8 patch
Definition: physfs.h:402
PHYSFS_swapSLE32
PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val)
Swap littleendian signed 32 to platform's native byte order.
PHYSFS_swapSBE16
PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val)
Swap bigendian signed 16 to platform's native byte order.
PHYSFS_uint8
unsigned char PHYSFS_uint8
An unsigned, 8-bit integer type.
Definition: physfs.h:237
PHYSFS_Allocator
PhysicsFS allocation function pointers.
Definition: physfs.h:1981
PHYSFS_File
A PhysicsFS file handle.
Definition: physfs.h:341
PHYSFS_setBuffer
int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize)
Set up buffering for a PhysicsFS file handle.
PHYSFS_enumerateFiles
char ** PHYSFS_enumerateFiles(const char *dir)
Get a file listing of a search path's directory.
PHYSFS_swapUBE16
PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val)
Swap bigendian unsigned 16 to platform's native byte order.
PHYSFS_readSLE64
int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val)
Read and convert a signed 64-bit littleendian value.
PHYSFS_utf8ToUcs4
void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst, PHYSFS_uint64 len)
Convert a UTF-8 string to a UCS-4 string.
PHYSFS_readSLE32
int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val)
Read and convert a signed 32-bit littleendian value.
PHYSFS_setWriteDir
int PHYSFS_setWriteDir(const char *newDir)
Tell PhysicsFS where it may write files.
PHYSFS_sint32
signed int PHYSFS_sint32
A signed, 32-bit integer type.
Definition: physfs.h:267
PHYSFS_writeSBE64
int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val)
Convert and write a signed 64-bit bigending value.
PHYSFS_swapSLE16
PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val)
Swap littleendian signed 16 to platform's native byte order.
PHYSFS_writeSLE32
int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val)
Convert and write a signed 32-bit littleendian value.
PHYSFS_utf8FromUcs2
void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len)
Convert a UCS-2 string to a UTF-8 string.
PHYSFS_writeUBE32
int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val)
Convert and write an unsigned 32-bit bigendian value.
PHYSFS_sint16
signed short PHYSFS_sint16
A signed, 16-bit integer type.
Definition: physfs.h:255
PHYSFS_getCdRomDirs
char ** PHYSFS_getCdRomDirs(void)
Get an array of paths to available CD-ROM drives.
PHYSFS_symbolicLinksPermitted
int PHYSFS_symbolicLinksPermitted(void)
Determine if the symbolic links are permitted.
PHYSFS_openAppend
PHYSFS_File * PHYSFS_openAppend(const char *filename)
Open a file for appending.
PHYSFS_close
int PHYSFS_close(PHYSFS_File *handle)
Close a PhysicsFS filehandle.
PHYSFS_Allocator::Init
int(* Init)(void)
Definition: physfs.h:1983
PHYSFS_readSBE16
int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val)
Read and convert a signed 16-bit bigendian value.
PHYSFS_read
PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
Read data from a PhysicsFS filehandle.
PHYSFS_readUBE16
int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val)
Read and convert an unsigned 16-bit bigendian value.
PHYSFS_setSaneConfig
int PHYSFS_setSaneConfig(const char *organization, const char *appName, const char *archiveExt, int includeCdRoms, int archivesFirst)
Set up sane, default paths.
PHYSFS_tell
PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle)
Determine current position within a PhysicsFS filehandle.
PHYSFS_getSearchPathCallback
void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d)
Enumerate the search path, using an application-defined callback.
PHYSFS_readULE32
int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val)
Read and convert an unsigned 32-bit littleendian value.
PHYSFS_deinit
int PHYSFS_deinit(void)
Deinitialize the PhysicsFS library.
PHYSFS_writeSBE16
int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val)
Convert and write a signed 16-bit bigendian value.
PHYSFS_writeULE64
int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val)
Convert and write an unsigned 64-bit littleendian value.
PHYSFS_ArchiveInfo::author
const char * author
Definition: physfs.h:380
PHYSFS_eof
int PHYSFS_eof(PHYSFS_File *handle)
Check for end-of-file state on a PhysicsFS filehandle.
PHYSFS_getWriteDir
const char * PHYSFS_getWriteDir(void)
Get path where PhysicsFS will allow file writing.
PHYSFS_uint32
unsigned int PHYSFS_uint32
An unsigned, 32-bit integer type.
Definition: physfs.h:261
PHYSFS_addToSearchPath
int PHYSFS_addToSearchPath(const char *newDir, int appendToPath)
Add an archive or directory to the search path.
PHYSFS_mkdir
int PHYSFS_mkdir(const char *dirName)
Create a directory.
PHYSFS_getLastModTime
PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename)
Get the last modification time of a file.
PHYSFS_Allocator::Deinit
void(* Deinit)(void)
Definition: physfs.h:1984
PHYSFS_isSymbolicLink
int PHYSFS_isSymbolicLink(const char *fname)
Determine if a file in the search path is really a symbolic link.
PHYSFS_writeULE32
int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val)
Convert and write an unsigned 32-bit littleendian value.
PHYSFS_getBaseDir
const char * PHYSFS_getBaseDir(void)
Get the path where the application resides.
PHYSFS_init
int PHYSFS_init(const char *argv0)
Initialize the PhysicsFS library.
PHYSFS_getSearchPath
char ** PHYSFS_getSearchPath(void)
Get the current search path.
PHYSFS_delete
int PHYSFS_delete(const char *filename)
Delete a file or directory.
PHYSFS_readSLE16
int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val)
Read and convert a signed 16-bit littleendian value.
PHYSFS_ArchiveInfo
Information on various PhysicsFS-supported archives.
Definition: physfs.h:376
PHYSFS_getMountPoint
const char * PHYSFS_getMountPoint(const char *dir)
Determine a mounted archive's mountpoint.
PHYSFS_getCdRomDirsCallback
void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d)
Enumerate CD-ROM directories, using an application-defined callback.
PHYSFS_Allocator::Free
void(* Free)(void *)
Definition: physfs.h:1987
PHYSFS_permitSymbolicLinks
void PHYSFS_permitSymbolicLinks(int allow)
Enable or disable following of symbolic links.
PHYSFS_utf8FromUcs4
void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst, PHYSFS_uint64 len)
Convert a UCS-4 string to a UTF-8 string.
PHYSFS_writeSLE64
int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val)
Convert and write a signed 64-bit littleendian value.
PHYSFS_sint8
signed char PHYSFS_sint8
A signed, 8-bit integer type.
Definition: physfs.h:243
PHYSFS_supportedArchiveTypes
const PHYSFS_ArchiveInfo ** PHYSFS_supportedArchiveTypes(void)
Get a list of supported archive types.
PHYSFS_readUBE64
int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val)
Read and convert an unsigned 64-bit bigendian value.
PHYSFS_swapULE16
PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val)
Swap littleendian unsigned 16 to platform's native byte order.
PHYSFS_ArchiveInfo::description
const char * description
Definition: physfs.h:379
PHYSFS_EnumFilesCallback
void(* PHYSFS_EnumFilesCallback)(void *data, const char *origdir, const char *fname)
Function signature for callbacks that enumerate files.
Definition: physfs.h:2146
PHYSFS_File::opaque
void * opaque
Definition: physfs.h:343
PHYSFS_freeList
void PHYSFS_freeList(void *listVar)
Deallocate resources of lists returned by PhysicsFS.