physfs 2.0.3

physfs.h
Go to the documentation of this file.
1
216 #ifndef _INCLUDE_PHYSFS_H_
217 #define _INCLUDE_PHYSFS_H_
218
219 #ifdef __cplusplus
220 extern "C" {
221 #endif
222
223 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
224 #if (defined _MSC_VER)
225 #define __EXPORT__ __declspec(dllexport)
226 #elif (__GNUC__ >= 3)
227 #define __EXPORT__ __attribute__((visibility("default")))
228 #else
229 #define __EXPORT__
230 #endif
231 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
232
237 typedef unsigned char PHYSFS_uint8;
238
243 typedef signed char PHYSFS_sint8;
244
249 typedef unsigned short PHYSFS_uint16;
250
255 typedef signed short PHYSFS_sint16;
256
261 typedef unsigned int PHYSFS_uint32;
262
267 typedef signed int PHYSFS_sint32;
268
284 #if (defined PHYSFS_NO_64BIT_SUPPORT) /* oh well. */
285 typedef PHYSFS_uint32 PHYSFS_uint64;
286 typedef PHYSFS_sint32 PHYSFS_sint64;
287 #elif (defined _MSC_VER)
288 typedef signed __int64 PHYSFS_sint64;
289 typedef unsigned __int64 PHYSFS_uint64;
290 #else
291 typedef unsigned long long PHYSFS_uint64;
292 typedef signed long long PHYSFS_sint64;
293 #endif
294
295
296 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
297 /* Make sure the types really have the right sizes */
298 #define PHYSFS_COMPILE_TIME_ASSERT(name, x) \
299 typedef int PHYSFS_dummy_ ## name[(x) * 2 - 1]
300
301 PHYSFS_COMPILE_TIME_ASSERT(uint8, sizeof(PHYSFS_uint8) == 1);
302 PHYSFS_COMPILE_TIME_ASSERT(sint8, sizeof(PHYSFS_sint8) == 1);
303 PHYSFS_COMPILE_TIME_ASSERT(uint16, sizeof(PHYSFS_uint16) == 2);
304 PHYSFS_COMPILE_TIME_ASSERT(sint16, sizeof(PHYSFS_sint16) == 2);
305 PHYSFS_COMPILE_TIME_ASSERT(uint32, sizeof(PHYSFS_uint32) == 4);
306 PHYSFS_COMPILE_TIME_ASSERT(sint32, sizeof(PHYSFS_sint32) == 4);
307
308 #ifndef PHYSFS_NO_64BIT_SUPPORT
309 PHYSFS_COMPILE_TIME_ASSERT(uint64, sizeof(PHYSFS_uint64) == 8);
310 PHYSFS_COMPILE_TIME_ASSERT(sint64, sizeof(PHYSFS_sint64) == 8);
311 #endif
312
313 #undef PHYSFS_COMPILE_TIME_ASSERT
314
315 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
316
317
341 typedef struct PHYSFS_File
342 {
343 void *opaque;
344 } PHYSFS_File;
345
346
358 #define PHYSFS_file PHYSFS_File
359
360
376 typedef struct PHYSFS_ArchiveInfo
377 {
378 const char *extension;
379 const char *description;
380 const char *author;
381 const char *url;
382 } PHYSFS_ArchiveInfo;
383
384
398 typedef struct PHYSFS_Version
399 {
400 PHYSFS_uint8 major;
401 PHYSFS_uint8 minor;
402 PHYSFS_uint8 patch;
403 } PHYSFS_Version;
404
405 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
406 #define PHYSFS_VER_MAJOR 2
407 #define PHYSFS_VER_MINOR 0
408 #define PHYSFS_VER_PATCH 3
409 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
410
411
412 /* PhysicsFS state stuff ... */
413
430 #define PHYSFS_VERSION(x) \
431 { \
432 (x)->major = PHYSFS_VER_MAJOR; \
433 (x)->minor = PHYSFS_VER_MINOR; \
434 (x)->patch = PHYSFS_VER_PATCH; \
435 }
436
437
464 __EXPORT__ void PHYSFS_getLinkedVersion(PHYSFS_Version *ver);
465
466
487 __EXPORT__ int PHYSFS_init(const char *argv0);
488
489
516 __EXPORT__ int PHYSFS_deinit(void);
517
518
547 __EXPORT__ const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void);
548
549
563 __EXPORT__ void PHYSFS_freeList(void *listVar);
564
565
584 __EXPORT__ const char *PHYSFS_getLastError(void);
585
586
600 __EXPORT__ const char *PHYSFS_getDirSeparator(void);
601
602
633 __EXPORT__ void PHYSFS_permitSymbolicLinks(int allow);
634
635
636 /* !!! FIXME: const this? */
676 __EXPORT__ char **PHYSFS_getCdRomDirs(void);
677
678
695 __EXPORT__ const char *PHYSFS_getBaseDir(void);
696
697
718 __EXPORT__ const char *PHYSFS_getUserDir(void);
719
720
732 __EXPORT__ const char *PHYSFS_getWriteDir(void);
733
734
754 __EXPORT__ int PHYSFS_setWriteDir(const char *newDir);
755
756
771 __EXPORT__ int PHYSFS_addToSearchPath(const char *newDir, int appendToPath);
772
773
791 __EXPORT__ int PHYSFS_removeFromSearchPath(const char *oldDir);
792
793
820 __EXPORT__ char **PHYSFS_getSearchPath(void);
821
822
880 __EXPORT__ int PHYSFS_setSaneConfig(const char *organization,
881 const char *appName,
882 const char *archiveExt,
883 int includeCdRoms,
884 int archivesFirst);
885
886
887 /* Directory management stuff ... */
888
910 __EXPORT__ int PHYSFS_mkdir(const char *dirName);
911
912
943 __EXPORT__ int PHYSFS_delete(const char *filename);
944
945
971 __EXPORT__ const char *PHYSFS_getRealDir(const char *filename);
972
973
1012 __EXPORT__ char **PHYSFS_enumerateFiles(const char *dir);
1013
1014
1032 __EXPORT__ int PHYSFS_exists(const char *fname);
1033
1034
1052 __EXPORT__ int PHYSFS_isDirectory(const char *fname);
1053
1054
1072 __EXPORT__ int PHYSFS_isSymbolicLink(const char *fname);
1073
1074
1088 __EXPORT__ PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename);
1089
1090
1091 /* i/o stuff... */
1092
1115 __EXPORT__ PHYSFS_File *PHYSFS_openWrite(const char *filename);
1116
1117
1141 __EXPORT__ PHYSFS_File *PHYSFS_openAppend(const char *filename);
1142
1143
1166 __EXPORT__ PHYSFS_File *PHYSFS_openRead(const char *filename);
1167
1168
1187 __EXPORT__ int PHYSFS_close(PHYSFS_File *handle);
1188
1189
1206 __EXPORT__ PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle,
1207 void *buffer,
1208 PHYSFS_uint32 objSize,
1209 PHYSFS_uint32 objCount);
1210
1224 __EXPORT__ PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle,
1225 const void *buffer,
1226 PHYSFS_uint32 objSize,
1227 PHYSFS_uint32 objCount);
1228
1229
1230 /* File position stuff... */
1231
1244 __EXPORT__ int PHYSFS_eof(PHYSFS_File *handle);
1245
1246
1257 __EXPORT__ PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle);
1258
1259
1274 __EXPORT__ int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos);
1275
1276
1293 __EXPORT__ PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle);
1294
1295
1296 /* Buffering stuff... */
1297
1338 __EXPORT__ int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize);
1339
1340
1357 __EXPORT__ int PHYSFS_flush(PHYSFS_File *handle);
1358
1359
1360 /* Byteorder stuff... */
1361
1372 __EXPORT__ PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val);
1373
1374
1385 __EXPORT__ PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val);
1386
1397 __EXPORT__ PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val);
1398
1399
1410 __EXPORT__ PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val);
1411
1425 __EXPORT__ PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val);
1426
1427
1441 __EXPORT__ PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val);
1442
1443
1454 __EXPORT__ PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val);
1455
1456
1467 __EXPORT__ PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val);
1468
1479 __EXPORT__ PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val);
1480
1481
1492 __EXPORT__ PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val);
1493
1494
1508 __EXPORT__ PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val);
1509
1510
1524 __EXPORT__ PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
1525
1526
1540 __EXPORT__ int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val);
1541
1542
1557 __EXPORT__ int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val);
1558
1559
1573 __EXPORT__ int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val);
1574
1575
1590 __EXPORT__ int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val);
1591
1592
1606 __EXPORT__ int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val);
1607
1608
1623 __EXPORT__ int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val);
1624
1625
1639 __EXPORT__ int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val);
1640
1641
1656 __EXPORT__ int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val);
1657
1658
1675 __EXPORT__ int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val);
1676
1677
1694 __EXPORT__ int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val);
1695
1696
1713 __EXPORT__ int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val);
1714
1715
1732 __EXPORT__ int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val);
1733
1734
1747 __EXPORT__ int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val);
1748
1749
1762 __EXPORT__ int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val);
1763
1764
1777 __EXPORT__ int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val);
1778
1779
1792 __EXPORT__ int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val);
1793
1794
1807 __EXPORT__ int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val);
1808
1809
1822 __EXPORT__ int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val);
1823
1824
1837 __EXPORT__ int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val);
1838
1839
1852 __EXPORT__ int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val);
1853
1854
1870 __EXPORT__ int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val);
1871
1872
1888 __EXPORT__ int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val);
1889
1890
1906 __EXPORT__ int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val);
1907
1908
1924 __EXPORT__ int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val);
1925
1926
1927 /* Everything above this line is part of the PhysicsFS 1.0 API. */
1928
1943 __EXPORT__ int PHYSFS_isInit(void);
1944
1945
1958 __EXPORT__ int PHYSFS_symbolicLinksPermitted(void);
1959
1960
1981 typedef struct PHYSFS_Allocator
1982 {
1983 int (*Init)(void);
1984 void (*Deinit)(void);
1985 void *(*Malloc)(PHYSFS_uint64);
1986 void *(*Realloc)(void *, PHYSFS_uint64);
1987 void (*Free)(void *);
1988 } PHYSFS_Allocator;
1989
1990
2018 __EXPORT__ int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator);
2019
2020
2061 __EXPORT__ int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath);
2062
2085 __EXPORT__ const char *PHYSFS_getMountPoint(const char *dir);
2086
2087
2112 typedef void (*PHYSFS_StringCallback)(void *data, const char *str);
2113
2114
2146 typedef void (*PHYSFS_EnumFilesCallback)(void *data, const char *origdir,
2147 const char *fname);
2148
2149
2181 __EXPORT__ void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d);
2182
2183
2217 __EXPORT__ void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d);
2218
2219
2258 __EXPORT__ void PHYSFS_enumerateFilesCallback(const char *dir,
2259 PHYSFS_EnumFilesCallback c,
2260 void *d);
2261
2281 __EXPORT__ void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst,
2282 PHYSFS_uint64 len);
2283
2303 __EXPORT__ void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst,
2304 PHYSFS_uint64 len);
2305
2329 __EXPORT__ void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst,
2330 PHYSFS_uint64 len);
2331
2355 __EXPORT__ void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst,
2356 PHYSFS_uint64 len);
2357
2382 __EXPORT__ void PHYSFS_utf8FromLatin1(const char *src, char *dst,
2383 PHYSFS_uint64 len);
2384
2385 /* Everything above this line is part of the PhysicsFS 2.0 API. */
2386
2387
2388 #ifdef __cplusplus
2389 }
2390 #endif
2391
2392 #endif /* !defined _INCLUDE_PHYSFS_H_ */
2393
2394 /* end of physfs.h ... */
2395
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&#39;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&#39;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&#39;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&#39;s native byte order.
PHYSFS_swapUBE32
PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val)
Swap bigendian unsigned 32 to platform&#39;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&#39;s native byte order.
PHYSFS_swapSBE32
PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val)
Swap bigendian signed 32 to platform&#39;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&#39;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&#39;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&#39;s native byte order.
PHYSFS_swapSBE16
PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val)
Swap bigendian signed 16 to platform&#39;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&#39;s directory.
PHYSFS_swapUBE16
PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val)
Swap bigendian unsigned 16 to platform&#39;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&#39;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_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_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&#39;s mountpoint.
PHYSFS_getCdRomDirsCallback
void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d)
Enumerate CD-ROM directories, using an application-defined callback.
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&#39;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.