1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-02 02:53:32 +02:00

Add FILESYSTEM_isMounted()

This returns if the file given is mounted or not. 2.3 added level zip
support, so whenever the game loads level metadata, it will mount any
zip files in the levels directory; this function can be used to check if
any of those files have been mounted, and ignore them if so.
This commit is contained in:
Misa 2021-03-04 16:45:07 -08:00 committed by Ethan Lee
parent 6efed0740b
commit 9e4076a418
2 changed files with 6 additions and 0 deletions

View File

@ -186,6 +186,11 @@ bool FILESYSTEM_isFile(const char* filename)
|| stat.filetype == PHYSFS_FILETYPE_SYMLINK;
}
bool FILESYSTEM_isMounted(const char* filename)
{
return PHYSFS_getMountPoint(filename) != NULL;
}
static bool FILESYSTEM_exists(const char *fname)
{
return PHYSFS_exists(fname);

View File

@ -13,6 +13,7 @@ char *FILESYSTEM_getUserSaveDirectory(void);
char *FILESYSTEM_getUserLevelDirectory(void);
bool FILESYSTEM_isFile(const char* filename);
bool FILESYSTEM_isMounted(const char* filename);
void FILESYSTEM_mount(const char *fname);
void FILESYSTEM_loadZip(const char* filename);