-int FS_Seek (qfile_t* file, long offset, int whence);
-long FS_Tell (qfile_t* file);
-char *FS_Gets (qfile_t* file, char* buffer, int buffersize);
-char *FS_Getline (qfile_t *file); // DO NOT FREE the returned buffer
-int FS_Eof (qfile_t* file);
-
-qbyte *FS_LoadFile (const char *path, qboolean quiet);
-qboolean FS_WriteFile (const char *filename, void *data, int len);
+int FS_UnGetc (qfile_t* file, unsigned char c);
+int FS_Seek (qfile_t* file, fs_offset_t offset, int whence);
+fs_offset_t FS_Tell (qfile_t* file);
+fs_offset_t FS_FileSize (qfile_t* file);
+void FS_Purge (qfile_t* file);
+const char *FS_FileWithoutPath (const char *in);
+const char *FS_FileExtension (const char *in);
+int FS_CheckNastyPath (const char *path, qboolean isgamedir);
+
+extern const char *const fs_checkgamedir_missing; // "(missing)"
+const char *FS_CheckGameDir(const char *gamedir); // returns NULL if nasty, fs_checkgamedir_missing (exact pointer) if missing
+
+typedef struct
+{
+ char name[MAX_OSPATH];
+ char description[8192];
+}
+gamedir_t;
+extern gamedir_t *fs_all_gamedirs; // terminated by entry with empty name
+extern int fs_all_gamedirs_count;
+
+qboolean FS_ChangeGameDirs(int numgamedirs, char gamedirs[][MAX_QPATH], qboolean complain, qboolean failmissing);
+qboolean FS_IsRegisteredQuakePack(const char *name);
+int FS_CRCFile(const char *filename, size_t *filesizepointer);
+void FS_Rescan(void);
+
+typedef struct fssearch_s
+{
+ int numfilenames;
+ char **filenames;
+ // array of filenames
+ char *filenamesbuffer;
+}
+fssearch_t;
+
+fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet);
+void FS_FreeSearch(fssearch_t *search);
+
+unsigned char *FS_LoadFile (const char *path, mempool_t *pool, qboolean quiet, fs_offset_t *filesizepointer);
+qboolean FS_WriteFileInBlocks (const char *filename, const void *const *data, const fs_offset_t *len, size_t count);
+qboolean FS_WriteFile (const char *filename, const void *data, fs_offset_t len);