Re-added love.filesystem.exists.

If PhysFS 2.1-alpha is used and a directory is symlinked, isDirectory will return false (whereas it will return true when PhysFS 2.0 is used.) exists will return true in all cases.
This commit is contained in:
Alex Szpakowski
2015-12-11 23:17:49 -04:00
parent acc509878e
commit de0b63a48d
5 changed files with 48 additions and 29 deletions
+12 -6
View File
@@ -156,6 +156,12 @@ public:
**/
virtual std::string getRealDirectory(const char *filename) const = 0;
/**
* Checks if a path exists.
* @param path The path to check.
**/
virtual bool exists(const char *path) const = 0;
/**
* Checks if a path is a directory.
* @param dir The directory name to check.
@@ -168,6 +174,12 @@ public:
**/
virtual bool isFile(const char *file) const = 0;
/**
* Gets whether a filepath is actually a symlink.
* Always returns false if symlinks are not enabled.
**/
virtual bool isSymlink(const char *filename) const = 0;
/**
* Creates a directory. Write dir must be set.
* @param dir The directory to create.
@@ -232,12 +244,6 @@ public:
**/
virtual bool areSymlinksEnabled() const = 0;
/**
* Gets whether a filepath is actually a symlink.
* Always returns false if symlinks are not enabled.
**/
virtual bool isSymlink(const char *filename) const = 0;
// Require path accessors
// Not const because it's R/W
virtual std::vector<std::string> &getRequirePath() = 0;