diff options
author | Andrey Nazarov <skuller@skuller.net> | 2007-12-07 17:29:24 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2007-12-07 17:29:24 +0000 |
commit | 439dd89a479e2d02fa40a421849c73616f92198e (patch) | |
tree | 96731a474ea0198a611f5fa03bcb360119d212a2 /source/com_public.h | |
parent | 5c30b8152eb6a0fae6e50dbd834d73a2846df4ec (diff) |
Optimized FS_ListFiles (and broken Windows build).
Initial changes to demo browser to support caching.
Diffstat (limited to 'source/com_public.h')
-rw-r--r-- | source/com_public.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/com_public.h b/source/com_public.h index 403c6f1..5ad6d7f 100644 --- a/source/com_public.h +++ b/source/com_public.h @@ -123,13 +123,13 @@ FILESYSTEM #define MAX_LISTED_FILES 4096 -typedef struct fsSearchInfo_s { - int fileSize; - qtime_t timeCreate; - qtime_t timeModify; +typedef struct fsFileInfo_s { + int size; + time_t ctime; + time_t mtime; + char name[1]; } fsFileInfo_t; - /* bits 0 - 1, enum */ #define FS_MODE_APPEND 0x00000000 #define FS_MODE_READ 0x00000001 @@ -177,15 +177,17 @@ typedef struct fsAPI_s { void (*FCloseFile)( fileHandle_t f ); int (*Read)( void *buffer, int len, fileHandle_t f ); int (*Write)( const void *buffer, int len, fileHandle_t f ); - int (*FOpenFile)( const char *filename, fileHandle_t *f, uint32 mode ); + int (*FOpenFile)( const char *filename, fileHandle_t *f, int mode ); + void (*FPrintf)( fileHandle_t f, const char *format, ... ); + int (*ReadLine)( fileHandle_t f, char *buffer, int size ); int (*Tell)( fileHandle_t f ); int (*RawTell)( fileHandle_t f ); int (*LoadFile)( const char *path, void **buffer ); - int (*LoadFileEx)( const char *path, void **buffer, uint32 flags ); + int (*LoadFileEx)( const char *path, void **buffer, int flags ); void *(*AllocTempMem)( int length ); void (*FreeFile)( void *buffer ); - char **(*ListFiles)( const char *path, const char *extension, uint32 flags, int *numFiles ); - void (*FreeFileList)( char **list ); + void **(*ListFiles)( const char *path, const char *extension, int flags, int *numFiles ); + void (*FreeList)( void **list ); } fsAPI_t; extern fsAPI_t fs; |