Added love.filesystem.getSourceBaseDirectory and changed love.filesystem.mount to allow mounting the path returned by love.filesystem.getSourceBaseDirectory in fused mode.

This commit is contained in:
Alex Szpakowski
2013-08-10 20:11:50 -03:00
parent 7e4e5e9c0b
commit daf50698b8
4 changed files with 116 additions and 32 deletions
@@ -118,6 +118,12 @@ public:
**/
bool setSource(const char *source);
/**
* Gets the path to the game source.
* Returns a 0-length string if the source has not been set.
**/
const char *getSource() const;
bool mount(const char *archive, const char *mountpoint, SearchOrder searchorder = SEARCH_ORDER_FIRST);
bool unmount(const char *archive);
@@ -162,6 +168,13 @@ public:
**/
const char *getSaveDirectory();
/**
* Gets the full path to the directory containing the game source.
* For example if the game source is C:\Games\mygame.love, this will return
* C:\Games.
**/
std::string getSourceBaseDirectory() const;
/**
* Checks whether a file exists in the current search path
* or not.