physfs: physfs.h Source File

physfs 3.0.0

physfs.h
Go to the documentation of this file.
1
219 #ifndef _INCLUDE_PHYSFS_H_
220 #define _INCLUDE_PHYSFS_H_
221
222 #ifdef __cplusplus
223 extern "C" {
224 #endif
225
226 #if defined(PHYSFS_DECL)
227 /* do nothing. */
228 #elif (defined _MSC_VER)
229 #define PHYSFS_DECL __declspec(dllexport)
230 #elif (defined __SUNPRO_C)
231 #define PHYSFS_DECL __global
232 #elif ((__GNUC__ >= 3) && (!__EMX__) && (!sun))
233 #define PHYSFS_DECL __attribute__((visibility("default")))
234 #else
235 #define PHYSFS_DECL
236 #endif
237
238 #if defined(PHYSFS_DEPRECATED)
239 /* do nothing. */
240 #elif (__GNUC__ >= 4) /* technically, this arrived in gcc 3.1, but oh well. */
241 #define PHYSFS_DEPRECATED __attribute__((deprecated))
242 #else
243 #define PHYSFS_DEPRECATED
244 #endif
245
246 #if 0 /* !!! FIXME: look into this later. */
247 #if defined(PHYSFS_CALL)
248 /* do nothing. */
249 #elif defined(__WIN32__) && !defined(__GNUC__)
250 #define PHYSFS_CALL __cdecl
251 #elif defined(__OS2__) || defined(OS2) /* should work across all compilers. */
252 #define PHYSFS_CALL _System
253 #else
254 #define PHYSFS_CALL
255 #endif
256 #endif
257
262 typedef unsigned char PHYSFS_uint8;
263
268 typedef signed char PHYSFS_sint8;
269
274 typedef unsigned short PHYSFS_uint16;
275
280 typedef signed short PHYSFS_sint16;
281
286 typedef unsigned int PHYSFS_uint32;
287
292 typedef signed int PHYSFS_sint32;
293
309 #if (defined PHYSFS_NO_64BIT_SUPPORT) /* oh well. */
310 typedef PHYSFS_uint32 PHYSFS_uint64;
311 typedef PHYSFS_sint32 PHYSFS_sint64;
312 #elif (defined _MSC_VER)
313 typedef signed __int64 PHYSFS_sint64;
314 typedef unsigned __int64 PHYSFS_uint64;
315 #else
316 typedef unsigned long long PHYSFS_uint64;
317 typedef signed long long PHYSFS_sint64;
318 #endif
319
320
321 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
322 /* Make sure the types really have the right sizes */
323 #define PHYSFS_COMPILE_TIME_ASSERT(name, x) \
324 typedef int PHYSFS_compile_time_assert_##name[(x) * 2 - 1]
325
326 PHYSFS_COMPILE_TIME_ASSERT(uint8IsOneByte, sizeof(PHYSFS_uint8) == 1);
327 PHYSFS_COMPILE_TIME_ASSERT(sint8IsOneByte, sizeof(PHYSFS_sint8) == 1);
328 PHYSFS_COMPILE_TIME_ASSERT(uint16IsTwoBytes, sizeof(PHYSFS_uint16) == 2);
329 PHYSFS_COMPILE_TIME_ASSERT(sint16IsTwoBytes, sizeof(PHYSFS_sint16) == 2);
330 PHYSFS_COMPILE_TIME_ASSERT(uint32IsFourBytes, sizeof(PHYSFS_uint32) == 4);
331 PHYSFS_COMPILE_TIME_ASSERT(sint32IsFourBytes, sizeof(PHYSFS_sint32) == 4);
332
333 #ifndef PHYSFS_NO_64BIT_SUPPORT
334 PHYSFS_COMPILE_TIME_ASSERT(uint64IsEightBytes, sizeof(PHYSFS_uint64) == 8);
335 PHYSFS_COMPILE_TIME_ASSERT(sint64IsEightBytes, sizeof(PHYSFS_sint64) == 8);
336 #endif
337
338 #undef PHYSFS_COMPILE_TIME_ASSERT
339
340 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
341
342
366 typedef struct PHYSFS_File
367 {
368 void *opaque;
369 } PHYSFS_File;
370
371
383 #define PHYSFS_file PHYSFS_File
384
385
403 typedef struct PHYSFS_ArchiveInfo
404 {
405 const char *extension;
406 const char *description;
407 const char *author;
408 const char *url;
409 int supportsSymlinks;
410 } PHYSFS_ArchiveInfo;
411
412
426 typedef struct PHYSFS_Version
427 {
428 PHYSFS_uint8 major;
429 PHYSFS_uint8 minor;
430 PHYSFS_uint8 patch;
431 } PHYSFS_Version;
432
433
434 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
435 #define PHYSFS_VER_MAJOR 3
436 #define PHYSFS_VER_MINOR 0
437 #define PHYSFS_VER_PATCH 0
438 #endif /* DOXYGEN_SHOULD_IGNORE_THIS */
439
440
441 /* PhysicsFS state stuff ... */
442
459 #define PHYSFS_VERSION(x) \
460 { \
461 (x)->major = PHYSFS_VER_MAJOR; \
462 (x)->minor = PHYSFS_VER_MINOR; \
463 (x)->patch = PHYSFS_VER_PATCH; \
464 }
465
466
493 PHYSFS_DECL void PHYSFS_getLinkedVersion(PHYSFS_Version *ver);
494
495
516 PHYSFS_DECL int PHYSFS_init(const char *argv0);
517
518
545 PHYSFS_DECL int PHYSFS_deinit(void);
546
547
581 PHYSFS_DECL const PHYSFS_ArchiveInfo **PHYSFS_supportedArchiveTypes(void);
582
583
601 PHYSFS_DECL void PHYSFS_freeList(void *listVar);
602
603
654 PHYSFS_DECL const char *PHYSFS_getLastError(void) PHYSFS_DEPRECATED;
655
656
670 PHYSFS_DECL const char *PHYSFS_getDirSeparator(void);
671
672
708 PHYSFS_DECL void PHYSFS_permitSymbolicLinks(int allow);
709
710
750 PHYSFS_DECL char **PHYSFS_getCdRomDirs(void);
751
752
769 PHYSFS_DECL const char *PHYSFS_getBaseDir(void);
770
771
792 PHYSFS_DECL const char *PHYSFS_getUserDir(void) PHYSFS_DEPRECATED;
793
794
806 PHYSFS_DECL const char *PHYSFS_getWriteDir(void);
807
808
828 PHYSFS_DECL int PHYSFS_setWriteDir(const char *newDir);
829
830
851 PHYSFS_DECL int PHYSFS_addToSearchPath(const char *newDir, int appendToPath)
852 PHYSFS_DEPRECATED;
853
878 PHYSFS_DECL int PHYSFS_removeFromSearchPath(const char *oldDir)
879 PHYSFS_DEPRECATED;
880
881
908 PHYSFS_DECL char **PHYSFS_getSearchPath(void);
909
910
969 PHYSFS_DECL int PHYSFS_setSaneConfig(const char *organization,
970 const char *appName,
971 const char *archiveExt,
972 int includeCdRoms,
973 int archivesFirst);
974
975
976 /* Directory management stuff ... */
977
999 PHYSFS_DECL int PHYSFS_mkdir(const char *dirName);
1000
1001
1032 PHYSFS_DECL int PHYSFS_delete(const char *filename);
1033
1034
1065 PHYSFS_DECL const char *PHYSFS_getRealDir(const char *filename);
1066
1067
1119 PHYSFS_DECL char **PHYSFS_enumerateFiles(const char *dir);
1120
1121
1136 PHYSFS_DECL int PHYSFS_exists(const char *fname);
1137
1138
1159 PHYSFS_DECL int PHYSFS_isDirectory(const char *fname) PHYSFS_DEPRECATED;
1160
1161
1182 PHYSFS_DECL int PHYSFS_isSymbolicLink(const char *fname) PHYSFS_DEPRECATED;
1183
1184
1206 PHYSFS_DECL PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename)
1207 PHYSFS_DEPRECATED;
1208
1209
1210 /* i/o stuff... */
1211
1234 PHYSFS_DECL PHYSFS_File *PHYSFS_openWrite(const char *filename);
1235
1236
1260 PHYSFS_DECL PHYSFS_File *PHYSFS_openAppend(const char *filename);
1261
1262
1285 PHYSFS_DECL PHYSFS_File *PHYSFS_openRead(const char *filename);
1286
1287
1306 PHYSFS_DECL int PHYSFS_close(PHYSFS_File *handle);
1307
1308
1333 PHYSFS_DECL PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle,
1334 void *buffer,
1335 PHYSFS_uint32 objSize,
1336 PHYSFS_uint32 objCount)
1337 PHYSFS_DEPRECATED;
1338
1362 PHYSFS_DECL PHYSFS_sint64 PHYSFS_write(PHYSFS_File *handle,
1363 const void *buffer,
1364 PHYSFS_uint32 objSize,
1365 PHYSFS_uint32 objCount)
1366 PHYSFS_DEPRECATED;
1367
1368
1369 /* File position stuff... */
1370
1383 PHYSFS_DECL int PHYSFS_eof(PHYSFS_File *handle);
1384
1385
1396 PHYSFS_DECL PHYSFS_sint64 PHYSFS_tell(PHYSFS_File *handle);
1397
1398
1413 PHYSFS_DECL int PHYSFS_seek(PHYSFS_File *handle, PHYSFS_uint64 pos);
1414
1415
1430 PHYSFS_DECL PHYSFS_sint64 PHYSFS_fileLength(PHYSFS_File *handle);
1431
1432
1433 /* Buffering stuff... */
1434
1475 PHYSFS_DECL int PHYSFS_setBuffer(PHYSFS_File *handle, PHYSFS_uint64 bufsize);
1476
1477
1494 PHYSFS_DECL int PHYSFS_flush(PHYSFS_File *handle);
1495
1496
1497 /* Byteorder stuff... */
1498
1509 PHYSFS_DECL PHYSFS_sint16 PHYSFS_swapSLE16(PHYSFS_sint16 val);
1510
1511
1522 PHYSFS_DECL PHYSFS_uint16 PHYSFS_swapULE16(PHYSFS_uint16 val);
1523
1534 PHYSFS_DECL PHYSFS_sint32 PHYSFS_swapSLE32(PHYSFS_sint32 val);
1535
1536
1547 PHYSFS_DECL PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val);
1548
1562 PHYSFS_DECL PHYSFS_sint64 PHYSFS_swapSLE64(PHYSFS_sint64 val);
1563
1564
1578 PHYSFS_DECL PHYSFS_uint64 PHYSFS_swapULE64(PHYSFS_uint64 val);
1579
1580
1591 PHYSFS_DECL PHYSFS_sint16 PHYSFS_swapSBE16(PHYSFS_sint16 val);
1592
1593
1604 PHYSFS_DECL PHYSFS_uint16 PHYSFS_swapUBE16(PHYSFS_uint16 val);
1605
1616 PHYSFS_DECL PHYSFS_sint32 PHYSFS_swapSBE32(PHYSFS_sint32 val);
1617
1618
1629 PHYSFS_DECL PHYSFS_uint32 PHYSFS_swapUBE32(PHYSFS_uint32 val);
1630
1631
1645 PHYSFS_DECL PHYSFS_sint64 PHYSFS_swapSBE64(PHYSFS_sint64 val);
1646
1647
1661 PHYSFS_DECL PHYSFS_uint64 PHYSFS_swapUBE64(PHYSFS_uint64 val);
1662
1663
1677 PHYSFS_DECL int PHYSFS_readSLE16(PHYSFS_File *file, PHYSFS_sint16 *val);
1678
1679
1694 PHYSFS_DECL int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val);
1695
1696
1710 PHYSFS_DECL int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val);
1711
1712
1727 PHYSFS_DECL int PHYSFS_readUBE16(PHYSFS_File *file, PHYSFS_uint16 *val);
1728
1729
1743 PHYSFS_DECL int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val);
1744
1745
1760 PHYSFS_DECL int PHYSFS_readULE32(PHYSFS_File *file, PHYSFS_uint32 *val);
1761
1762
1776 PHYSFS_DECL int PHYSFS_readSBE32(PHYSFS_File *file, PHYSFS_sint32 *val);
1777
1778
1793 PHYSFS_DECL int PHYSFS_readUBE32(PHYSFS_File *file, PHYSFS_uint32 *val);
1794
1795
1812 PHYSFS_DECL int PHYSFS_readSLE64(PHYSFS_File *file, PHYSFS_sint64 *val);
1813
1814
1831 PHYSFS_DECL int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val);
1832
1833
1850 PHYSFS_DECL int PHYSFS_readSBE64(PHYSFS_File *file, PHYSFS_sint64 *val);
1851
1852
1869 PHYSFS_DECL int PHYSFS_readUBE64(PHYSFS_File *file, PHYSFS_uint64 *val);
1870
1871
1884 PHYSFS_DECL int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val);
1885
1886
1899 PHYSFS_DECL int PHYSFS_writeULE16(PHYSFS_File *file, PHYSFS_uint16 val);
1900
1901
1914 PHYSFS_DECL int PHYSFS_writeSBE16(PHYSFS_File *file, PHYSFS_sint16 val);
1915
1916
1929 PHYSFS_DECL int PHYSFS_writeUBE16(PHYSFS_File *file, PHYSFS_uint16 val);
1930
1931
1944 PHYSFS_DECL int PHYSFS_writeSLE32(PHYSFS_File *file, PHYSFS_sint32 val);
1945
1946
1959 PHYSFS_DECL int PHYSFS_writeULE32(PHYSFS_File *file, PHYSFS_uint32 val);
1960
1961
1974 PHYSFS_DECL int PHYSFS_writeSBE32(PHYSFS_File *file, PHYSFS_sint32 val);
1975
1976
1989 PHYSFS_DECL int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val);
1990
1991
2007 PHYSFS_DECL int PHYSFS_writeSLE64(PHYSFS_File *file, PHYSFS_sint64 val);
2008
2009
2025 PHYSFS_DECL int PHYSFS_writeULE64(PHYSFS_File *file, PHYSFS_uint64 val);
2026
2027
2043 PHYSFS_DECL int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val);
2044
2045
2061 PHYSFS_DECL int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val);
2062
2063
2064 /* Everything above this line is part of the PhysicsFS 1.0 API. */
2065
2080 PHYSFS_DECL int PHYSFS_isInit(void);
2081
2082
2095 PHYSFS_DECL int PHYSFS_symbolicLinksPermitted(void);
2096
2097
2118 typedef struct PHYSFS_Allocator
2119 {
2120 int (*Init)(void);
2121 void (*Deinit)(void);
2122 void *(*Malloc)(PHYSFS_uint64);
2123 void *(*Realloc)(void *, PHYSFS_uint64);
2124 void (*Free)(void *);
2125 } PHYSFS_Allocator;
2126
2127
2155 PHYSFS_DECL int PHYSFS_setAllocator(const PHYSFS_Allocator *allocator);
2156
2157
2199 PHYSFS_DECL int PHYSFS_mount(const char *newDir,
2200 const char *mountPoint,
2201 int appendToPath);
2202
2225 PHYSFS_DECL const char *PHYSFS_getMountPoint(const char *dir);
2226
2227
2252 typedef void (*PHYSFS_StringCallback)(void *data, const char *str);
2253
2254
2290 typedef void (*PHYSFS_EnumFilesCallback)(void *data, const char *origdir,
2291 const char *fname);
2292
2293
2325 PHYSFS_DECL void PHYSFS_getCdRomDirsCallback(PHYSFS_StringCallback c, void *d);
2326
2327
2361 PHYSFS_DECL void PHYSFS_getSearchPathCallback(PHYSFS_StringCallback c, void *d);
2362
2363
2381 PHYSFS_DECL void PHYSFS_enumerateFilesCallback(const char *dir,
2382 PHYSFS_EnumFilesCallback c,
2383 void *d) PHYSFS_DEPRECATED;
2384
2408 PHYSFS_DECL void PHYSFS_utf8FromUcs4(const PHYSFS_uint32 *src, char *dst,
2409 PHYSFS_uint64 len);
2410
2434 PHYSFS_DECL void PHYSFS_utf8ToUcs4(const char *src, PHYSFS_uint32 *dst,
2435 PHYSFS_uint64 len);
2436
2468 PHYSFS_DECL void PHYSFS_utf8FromUcs2(const PHYSFS_uint16 *src, char *dst,
2469 PHYSFS_uint64 len);
2470
2503 PHYSFS_DECL void PHYSFS_utf8ToUcs2(const char *src, PHYSFS_uint16 *dst,
2504 PHYSFS_uint64 len);
2505
2529 PHYSFS_DECL void PHYSFS_utf8FromLatin1(const char *src, char *dst,
2530 PHYSFS_uint64 len);
2531
2532 /* Everything above this line is part of the PhysicsFS 2.0 API. */
2533
2561 PHYSFS_DECL int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to);
2562
2563
2589 PHYSFS_DECL int PHYSFS_utf8stricmp(const char *str1, const char *str2);
2590
2612 PHYSFS_DECL int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1,
2613 const PHYSFS_uint16 *str2);
2614
2636 PHYSFS_DECL int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1,
2637 const PHYSFS_uint32 *str2);
2638
2639
2650 typedef enum PHYSFS_EnumerateCallbackResult
2651 {
2652 PHYSFS_ENUM_ERROR = -1,
2653 PHYSFS_ENUM_STOP = 0,
2654 PHYSFS_ENUM_OK = 1
2655 } PHYSFS_EnumerateCallbackResult;
2656
2684 typedef PHYSFS_EnumerateCallbackResult (*PHYSFS_EnumerateCallback)(void *data,
2685 const char *origdir, const char *fname);
2686
2746 PHYSFS_DECL int PHYSFS_enumerate(const char *dir, PHYSFS_EnumerateCallback c,
2747 void *d);
2748
2749
2770 PHYSFS_DECL int PHYSFS_unmount(const char *oldDir);
2771
2772
2806 PHYSFS_DECL const PHYSFS_Allocator *PHYSFS_getAllocator(void);
2807
2808
2817 typedef enum PHYSFS_FileType
2818 {
2819 PHYSFS_FILETYPE_REGULAR,
2820 PHYSFS_FILETYPE_DIRECTORY,
2821 PHYSFS_FILETYPE_SYMLINK,
2822 PHYSFS_FILETYPE_OTHER
2823 } PHYSFS_FileType;
2824
2842 typedef struct PHYSFS_Stat
2843 {
2844 PHYSFS_sint64 filesize;
2845 PHYSFS_sint64 modtime;
2846 PHYSFS_sint64 createtime;
2847 PHYSFS_sint64 accesstime;
2848 PHYSFS_FileType filetype;
2849 int readonly;
2850 } PHYSFS_Stat;
2851
2871 PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat);
2872
2873
2902 PHYSFS_DECL void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst,
2903 PHYSFS_uint64 len);
2904
2938 PHYSFS_DECL void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst,
2939 PHYSFS_uint64 len);
2940
2941
2958 PHYSFS_DECL PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer,
2959 PHYSFS_uint64 len);
2960
2984 PHYSFS_DECL PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle,
2985 const void *buffer,
2986 PHYSFS_uint64 len);
2987
2988
3030 typedef struct PHYSFS_Io
3031 {
3040 PHYSFS_uint32 version;
3041
3050 void *opaque;
3051
3071 PHYSFS_sint64 (*read)(struct PHYSFS_Io *io, void *buf, PHYSFS_uint64 len);
3072
3096 PHYSFS_sint64 (*write)(struct PHYSFS_Io *io, const void *buffer,
3097 PHYSFS_uint64 len);
3098
3110 int (*seek)(struct PHYSFS_Io *io, PHYSFS_uint64 offset);
3111
3122 PHYSFS_sint64 (*tell)(struct PHYSFS_Io *io);
3123
3134 PHYSFS_sint64 (*length)(struct PHYSFS_Io *io);
3135
3152 struct PHYSFS_Io *(*duplicate)(struct PHYSFS_Io *io);
3153
3167 int (*flush)(struct PHYSFS_Io *io);
3168
3186 void (*destroy)(struct PHYSFS_Io *io);
3187 } PHYSFS_Io;
3188
3189
3227 PHYSFS_DECL int PHYSFS_mountIo(PHYSFS_Io *io, const char *fname,
3228 const char *mountPoint, int appendToPath);
3229
3230
3271 PHYSFS_DECL int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len,
3272 void (*del)(void *), const char *fname,
3273 const char *mountPoint, int appendToPath);
3274
3275
3326 PHYSFS_DECL int PHYSFS_mountHandle(PHYSFS_File *file, const char *fname,
3327 const char *mountPoint, int appendToPath);
3328
3329
3348 typedef enum PHYSFS_ErrorCode
3349 {
3350 PHYSFS_ERR_OK,
3351 PHYSFS_ERR_OTHER_ERROR,
3352 PHYSFS_ERR_OUT_OF_MEMORY,
3353 PHYSFS_ERR_NOT_INITIALIZED,
3354 PHYSFS_ERR_IS_INITIALIZED,
3355 PHYSFS_ERR_ARGV0_IS_NULL,
3356 PHYSFS_ERR_UNSUPPORTED,
3357 PHYSFS_ERR_PAST_EOF,
3358 PHYSFS_ERR_FILES_STILL_OPEN,
3359 PHYSFS_ERR_INVALID_ARGUMENT,
3360 PHYSFS_ERR_NOT_MOUNTED,
3361 PHYSFS_ERR_NOT_FOUND,
3362 PHYSFS_ERR_SYMLINK_FORBIDDEN,
3363 PHYSFS_ERR_NO_WRITE_DIR,
3364 PHYSFS_ERR_OPEN_FOR_READING,
3365 PHYSFS_ERR_OPEN_FOR_WRITING,
3366 PHYSFS_ERR_NOT_A_FILE,
3367 PHYSFS_ERR_READ_ONLY,
3368 PHYSFS_ERR_CORRUPT,
3369 PHYSFS_ERR_SYMLINK_LOOP,
3370 PHYSFS_ERR_IO,
3371 PHYSFS_ERR_PERMISSION,
3372 PHYSFS_ERR_NO_SPACE,
3373 PHYSFS_ERR_BAD_FILENAME,
3374 PHYSFS_ERR_BUSY,
3375 PHYSFS_ERR_DIR_NOT_EMPTY,
3376 PHYSFS_ERR_OS_ERROR,
3377 PHYSFS_ERR_DUPLICATE,
3378 PHYSFS_ERR_BAD_PASSWORD,
3379 PHYSFS_ERR_APP_CALLBACK
3380 } PHYSFS_ErrorCode;
3381
3382
3411 PHYSFS_DECL PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void);
3412
3413
3442 PHYSFS_DECL const char *PHYSFS_getErrorByCode(PHYSFS_ErrorCode code);
3443
3471 PHYSFS_DECL void PHYSFS_setErrorCode(PHYSFS_ErrorCode code);
3472
3473
3539 PHYSFS_DECL const char *PHYSFS_getPrefDir(const char *org, const char *app);
3540
3541
3598 typedef struct PHYSFS_Archiver
3599 {
3608 PHYSFS_uint32 version;
3609
3616 PHYSFS_ArchiveInfo info;
3617
3643 void *(*openArchive)(PHYSFS_Io *io, const char *name,
3644 int forWrite, int *claimed);
3645
3671 PHYSFS_EnumerateCallbackResult (*enumerate)(void *opaque,
3672 const char *dirname, PHYSFS_EnumerateCallback cb,
3673 const char *origdir, void *callbackdata);
3674
3684 PHYSFS_Io *(*openRead)(void *opaque, const char *fnm);
3685
3698 PHYSFS_Io *(*openWrite)(void *opaque, const char *filename);
3699
3711 PHYSFS_Io *(*openAppend)(void *opaque, const char *filename);
3712
3725 int (*remove)(void *opaque, const char *filename);
3726
3738 int (*mkdir)(void *opaque, const char *filename);
3739
3750 int (*stat)(void *opaque, const char *fn, PHYSFS_Stat *stat);
3751
3760 void (*closeArchive)(void *opaque);
3761 } PHYSFS_Archiver;
3762
3795 PHYSFS_DECL int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver);
3796
3823 PHYSFS_DECL int PHYSFS_deregisterArchiver(const char *ext);
3824
3825
3826 /* Everything above this line is part of the PhysicsFS 2.1 API. */
3827
3828 #ifdef __cplusplus
3829 }
3830 #endif
3831
3832 #endif /* !defined _INCLUDE_PHYSFS_H_ */
3833
3834 /* end of physfs.h ... */
3835
PHYSFS_ERR_IO
Definition: physfs.h:3370
PHYSFS_writeSLE16
int PHYSFS_writeSLE16(PHYSFS_File *file, PHYSFS_sint16 val)
Convert and write a signed 16-bit littleendian value.
PHYSFS_FILETYPE_DIRECTORY
Definition: physfs.h:2820
PHYSFS_Io::opaque
void * opaque
Instance data for this struct.
Definition: physfs.h:3050
PHYSFS_writeUBE64
int PHYSFS_writeUBE64(PHYSFS_File *file, PHYSFS_uint64 val)
Convert and write an unsigned 64-bit bigendian value.
PHYSFS_Archiver
Abstract interface to provide support for user-defined archives.
Definition: physfs.h:3598
PHYSFS_Io::write
PHYSFS_sint64(* write)(struct PHYSFS_Io *io, const void *buffer, PHYSFS_uint64 len)
Write more data.
Definition: physfs.h:3096
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_writeBytes
PHYSFS_sint64 PHYSFS_writeBytes(PHYSFS_File *handle, const void *buffer, PHYSFS_uint64 len)
Write data to a PhysicsFS filehandle.
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_ERR_CORRUPT
Definition: physfs.h:3368
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:408
PHYSFS_readULE64
int PHYSFS_readULE64(PHYSFS_File *file, PHYSFS_uint64 *val)
Read and convert an unsigned 64-bit littleendian value.
PHYSFS_Io::version
PHYSFS_uint32 version
Binary compatibility information.
Definition: physfs.h:3040
PHYSFS_Archiver::stat
int(* stat)(void *opaque, const char *fn, PHYSFS_Stat *stat)
Obtain basic file metadata.
Definition: physfs.h:3750
PHYSFS_ERR_SYMLINK_LOOP
Definition: physfs.h:3369
PHYSFS_ucs4stricmp
int PHYSFS_ucs4stricmp(const PHYSFS_uint32 *str1, const PHYSFS_uint32 *str2)
Case-insensitive compare of two UCS-4 strings.
PHYSFS_ERR_BUSY
Definition: physfs.h:3374
PHYSFS_Stat::readonly
int readonly
Definition: physfs.h:2849
PHYSFS_getLastError
const char * PHYSFS_getLastError(void)
Get human-readable error information.
PHYSFS_getAllocator
const PHYSFS_Allocator * PHYSFS_getAllocator(void)
Discover the current allocator.
PHYSFS_ArchiveInfo::extension
const char * extension
Definition: physfs.h:405
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_ERR_OPEN_FOR_WRITING
Definition: physfs.h:3365
PHYSFS_ERR_DIR_NOT_EMPTY
Definition: physfs.h:3375
PHYSFS_Stat::accesstime
PHYSFS_sint64 accesstime
Definition: physfs.h:2847
PHYSFS_mountIo
int PHYSFS_mountIo(PHYSFS_Io *io, const char *fname, const char *mountPoint, int appendToPath)
Add an archive, built on a PHYSFS_Io, to the search path.
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:2252
PHYSFS_Version
Information the version of PhysicsFS in use.
Definition: physfs.h:426
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:274
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:317
PHYSFS_ArchiveInfo::supportsSymlinks
int supportsSymlinks
Definition: physfs.h:409
PHYSFS_openWrite
PHYSFS_File * PHYSFS_openWrite(const char *filename)
Open a file for writing.
PHYSFS_ERR_NOT_FOUND
Definition: physfs.h:3361
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_deregisterArchiver
int PHYSFS_deregisterArchiver(const char *ext)
Remove an archiver from the system.
PHYSFS_FILETYPE_SYMLINK
Definition: physfs.h:2821
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_enumerate
int PHYSFS_enumerate(const char *dir, PHYSFS_EnumerateCallback c, void *d)
Get a file listing of a search path&#39;s directory, using an application-defined callback, with errors reported.
PHYSFS_Io::tell
PHYSFS_sint64(* tell)(struct PHYSFS_Io *io)
Report current i/o position.
Definition: physfs.h:3122
PHYSFS_Io::destroy
void(* destroy)(struct PHYSFS_Io *io)
Cleanup and deallocate i/o instance.
Definition: physfs.h:3186
PHYSFS_uint64
unsigned long long PHYSFS_uint64
An unsigned, 64-bit integer type.
Definition: physfs.h:316
PHYSFS_Io::seek
int(* seek)(struct PHYSFS_Io *io, PHYSFS_uint64 offset)
Move i/o position to a given byte offset from start.
Definition: physfs.h:3110
PHYSFS_ERR_SYMLINK_FORBIDDEN
Definition: physfs.h:3362
PHYSFS_readULE16
int PHYSFS_readULE16(PHYSFS_File *file, PHYSFS_uint16 *val)
Read and convert an unsigned 16-bit littleendian value.
PHYSFS_FILETYPE_OTHER
Definition: physfs.h:2822
PHYSFS_Version::major
PHYSFS_uint8 major
Definition: physfs.h:428
PHYSFS_ERR_PAST_EOF
Definition: physfs.h:3357
PHYSFS_getErrorByCode
const char * PHYSFS_getErrorByCode(PHYSFS_ErrorCode code)
Get human-readable description string for a given error code.
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_setErrorCode
void PHYSFS_setErrorCode(PHYSFS_ErrorCode code)
Set the current thread&#39;s error code.
PHYSFS_getLinkedVersion
void PHYSFS_getLinkedVersion(PHYSFS_Version *ver)
Get the version of PhysicsFS that is linked against your program.
PHYSFS_ERR_NO_SPACE
Definition: physfs.h:3372
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_ERR_IS_INITIALIZED
Definition: physfs.h:3354
PHYSFS_flush
int PHYSFS_flush(PHYSFS_File *handle)
Flush a buffered PhysicsFS file handle.
PHYSFS_Version::minor
PHYSFS_uint8 minor
Definition: physfs.h:429
PHYSFS_ERR_APP_CALLBACK
Definition: physfs.h:3379
PHYSFS_ENUM_OK
Definition: physfs.h:2654
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:430
PHYSFS_Archiver::info
PHYSFS_ArchiveInfo info
Basic info about this archiver.
Definition: physfs.h:3616
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_getPrefDir
const char * PHYSFS_getPrefDir(const char *org, const char *app)
Get the user-and-app-specific path where files can be written.
PHYSFS_ENUM_ERROR
Definition: physfs.h:2652
PHYSFS_uint8
unsigned char PHYSFS_uint8
An unsigned, 8-bit integer type.
Definition: physfs.h:262
PHYSFS_Allocator
PhysicsFS allocation function pointers.
Definition: physfs.h:2118
PHYSFS_File
A PhysicsFS file handle.
Definition: physfs.h:366
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_ERR_OUT_OF_MEMORY
Definition: physfs.h:3352
PHYSFS_readSLE32
int PHYSFS_readSLE32(PHYSFS_File *file, PHYSFS_sint32 *val)
Read and convert a signed 32-bit littleendian value.
PHYSFS_ENUM_STOP
Definition: physfs.h:2653
PHYSFS_ERR_OPEN_FOR_READING
Definition: physfs.h:3364
PHYSFS_Stat::modtime
PHYSFS_sint64 modtime
Definition: physfs.h:2845
PHYSFS_stat
int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat)
Get various information about a directory or a file.
PHYSFS_registerArchiver
int PHYSFS_registerArchiver(const PHYSFS_Archiver *archiver)
Add a new archiver to the system.
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:292
PHYSFS_writeSBE64
int PHYSFS_writeSBE64(PHYSFS_File *file, PHYSFS_sint64 val)
Convert and write a signed 64-bit bigending value.
PHYSFS_Io
An abstract i/o interface.
Definition: physfs.h:3030
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_mountMemory
int PHYSFS_mountMemory(const void *buf, PHYSFS_uint64 len, void(*del)(void *), const char *fname, const char *mountPoint, int appendToPath)
Add an archive, contained in a memory buffer, to the search path.
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_Stat::createtime
PHYSFS_sint64 createtime
Definition: physfs.h:2846
PHYSFS_writeUBE32
int PHYSFS_writeUBE32(PHYSFS_File *file, PHYSFS_uint32 val)
Convert and write an unsigned 32-bit bigendian value.
PHYSFS_ERR_BAD_FILENAME
Definition: physfs.h:3373
PHYSFS_sint16
signed short PHYSFS_sint16
A signed, 16-bit integer type.
Definition: physfs.h:280
PHYSFS_ERR_PERMISSION
Definition: physfs.h:3371
PHYSFS_ERR_NOT_INITIALIZED
Definition: physfs.h:3353
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_ERR_READ_ONLY
Definition: physfs.h:3367
PHYSFS_readSBE16
int PHYSFS_readSBE16(PHYSFS_File *file, PHYSFS_sint16 *val)
Read and convert a signed 16-bit bigendian value.
PHYSFS_utf8FromUtf16
void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len)
Convert a UTF-16 string to a UTF-8 string.
PHYSFS_ERR_FILES_STILL_OPEN
Definition: physfs.h:3358
PHYSFS_EnumerateCallbackResult
PHYSFS_EnumerateCallbackResult
Definition: physfs.h:2650
PHYSFS_read
PHYSFS_sint64 PHYSFS_read(PHYSFS_File *handle, void *buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount)
Read data from a PhysicsFS filehandle.
PHYSFS_Archiver::version
PHYSFS_uint32 version
Binary compatibility information.
Definition: physfs.h:3608
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:407
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_ERR_NO_WRITE_DIR
Definition: physfs.h:3363
PHYSFS_Stat::filesize
PHYSFS_sint64 filesize
Definition: physfs.h:2844
PHYSFS_uint32
unsigned int PHYSFS_uint32
An unsigned, 32-bit integer type.
Definition: physfs.h:286
PHYSFS_utf8stricmp
int PHYSFS_utf8stricmp(const char *str1, const char *str2)
Case-insensitive compare of two UTF-8 strings.
PHYSFS_addToSearchPath
int PHYSFS_addToSearchPath(const char *newDir, int appendToPath)
Add an archive or directory to the search path.
PHYSFS_FILETYPE_REGULAR
Definition: physfs.h:2819
PHYSFS_ERR_OS_ERROR
Definition: physfs.h:3376
PHYSFS_mkdir
int PHYSFS_mkdir(const char *dirName)
Create a directory.
PHYSFS_EnumerateCallback
PHYSFS_EnumerateCallbackResult(* PHYSFS_EnumerateCallback)(void *data, const char *origdir, const char *fname)
Possible return values from PHYSFS_EnumerateCallback.
Definition: physfs.h:2684
PHYSFS_getLastModTime
PHYSFS_sint64 PHYSFS_getLastModTime(const char *filename)
Get the last modification time of a file.
PHYSFS_utf16stricmp
int PHYSFS_utf16stricmp(const PHYSFS_uint16 *str1, const PHYSFS_uint16 *str2)
Case-insensitive compare of two UTF-16 strings.
PHYSFS_isSymbolicLink
int PHYSFS_isSymbolicLink(const char *fname)
Determine if a file in the search path is really a symbolic link.
PHYSFS_unmount
int PHYSFS_unmount(const char *oldDir)
Remove a directory or archive from the search path.
PHYSFS_ERR_OTHER_ERROR
Definition: physfs.h:3351
PHYSFS_Io::length
PHYSFS_sint64(* length)(struct PHYSFS_Io *io)
Determine size of the i/o instance&#39;s dataset.
Definition: physfs.h:3134
PHYSFS_ERR_NOT_MOUNTED
Definition: physfs.h:3360
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_ERR_OK
Definition: physfs.h:3350
PHYSFS_readBytes
PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, PHYSFS_uint64 len)
Read bytes from a PhysicsFS filehandle.
PHYSFS_getSearchPath
char ** PHYSFS_getSearchPath(void)
Get the current search path.
PHYSFS_FileType
PHYSFS_FileType
Type of a File.
Definition: physfs.h:2817
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:403
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_utf8ToUtf16
void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst, PHYSFS_uint64 len)
Convert a UTF-8 string to a UTF-16 string.
PHYSFS_caseFold
int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to)
"Fold" a Unicode codepoint to a lowercase equivalent.
PHYSFS_ERR_ARGV0_IS_NULL
Definition: physfs.h:3355
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_mountHandle
int PHYSFS_mountHandle(PHYSFS_File *file, const char *fname, const char *mountPoint, int appendToPath)
Add an archive, contained in a PHYSFS_File handle, to the search path.
PHYSFS_sint8
signed char PHYSFS_sint8
A signed, 8-bit integer type.
Definition: physfs.h:268
PHYSFS_supportedArchiveTypes
const PHYSFS_ArchiveInfo ** PHYSFS_supportedArchiveTypes(void)
Get a list of supported archive types.
PHYSFS_getLastErrorCode
PHYSFS_ErrorCode PHYSFS_getLastErrorCode(void)
Get machine-readable error information.
PHYSFS_Stat
Meta data for a file or directory.
Definition: physfs.h:2842
PHYSFS_ERR_NOT_A_FILE
Definition: physfs.h:3366
PHYSFS_ErrorCode
PHYSFS_ErrorCode
Values that represent specific causes of failure.
Definition: physfs.h:3348
PHYSFS_ERR_INVALID_ARGUMENT
Definition: physfs.h:3359
PHYSFS_ERR_UNSUPPORTED
Definition: physfs.h:3356
PHYSFS_ERR_BAD_PASSWORD
Definition: physfs.h:3378
PHYSFS_Io::flush
int(* flush)(struct PHYSFS_Io *io)
Flush resources to media, or wherever.
Definition: physfs.h:3167
PHYSFS_ERR_DUPLICATE
Definition: physfs.h:3377
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:406
PHYSFS_EnumFilesCallback
void(* PHYSFS_EnumFilesCallback)(void *data, const char *origdir, const char *fname)
Function signature for callbacks that enumerate files.
Definition: physfs.h:2290
PHYSFS_File::opaque
void * opaque
Definition: physfs.h:368
PHYSFS_Stat::filetype
PHYSFS_FileType filetype
Definition: physfs.h:2848
PHYSFS_freeList
void PHYSFS_freeList(void *listVar)
Deallocate resources of lists returned by PhysicsFS.