mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user