载入中...
搜索中...
未找到
Filesystem.cpp
浏览该文件的文档.
EVEngine assertion entry point, backed by zeroerr.
#define EV_PARAM_CHECK(cond,...)
Validate a function parameter / public API precondition.
Definition Assert.h:30
virtual std::string getName() const =0
Data buffer paired with a filename (used for type identification).
Definition FileData.h:12
void * getData() const
Gets a pointer to the data. This pointer will obviously not be valid if the Data object is destroyed.
Definition FileData.h:23
Definition Filesystem.h:31
virtual std::string getSourceBaseDirectory() const =0
Gets the full path to the directory containing the game source. For example if the game source is C:\...
virtual void allowMountingForPath(const std::string &path)=0
Allows a full (OS-dependent) path to be used with Filesystem::mount.
virtual bool isAndroidSaveExternal() const
Gets whether the Android save is external. Returns a bool.
Definition Filesystem.h:69
virtual std::string getUserDirectory()=0
Gets the user home directory.
virtual bool setSource(std::string source)=0
Sets the path to the game source. This can only be set once.
virtual std::string getExecutablePath() const
Gets the full platform-dependent path to the executable.
Definition Filesystem.cpp:112
virtual bool setIdentity(std::string ident, bool appendToPath=false)=0
Sets the name of the save folder.
virtual std::vector< std::string > & getRequirePath()=0
virtual std::string getLastWatchRealPath() const =0
virtual FileData * newFileData(const void *data, std::string filename, size_t size) const
Creates a new FileData object. Data will be copied.
Definition Filesystem.cpp:88
virtual int getWatchCount() const =0
virtual File * newFile(std::string filename) const =0
Creates a new file.
virtual std::string getWorkingDirectory()=0
Gets the current working directory.
virtual void setFused(bool fused)=0
virtual std::vector< std::string > getDirectoryItems(std::string dir)=0
This "native" method returns a table of all files in a given directory.
virtual std::string pollWatch()=0
Pop next watch event kind: "added"|"removed"|"modified"|"movedFrom"|"movedTo". Empty string if queue ...
virtual void unwatchAll()=0
virtual bool unwatch(std::string path)=0
Stop watching a path previously passed to watch().
virtual std::string getRealDirectory(std::string filename) const =0
Gets the real directory path containing the file.
virtual bool isFused() const =0
virtual std::string getAppdataDirectory()=0
Gets the APPDATA directory. On Windows, this is the folder in the APPDATA% enviroment variable....
virtual std::string getSaveDirectory()=0
Gets the full path of the save folder.
virtual bool isRealDirectory(const std::string &path) const
Gets whether the given full (OS-dependent) path is a directory.
Definition Filesystem.cpp:96
virtual std::string getLastWatchPath() const =0
virtual bool remove(std::string file)=0
Removes a file (or directory).
virtual bool createDirectory(std::string dir)=0
Creates a directory. Write dir must be set.
virtual std::string getIdentity() const =0
virtual bool areSymlinksEnabled() const =0
Gets whether symbolic link support is enabled.
virtual void write(std::string filename, const void *data, int64_t size) const =0
Write data to a file.
virtual bool setupWriteDirectory()=0
This sets up the save directory. If the it is already set up, nothing happens.
virtual FileData * read(std::string filename, int64_t size=File::ALL) const =0
Reads data from a file.
virtual void append(std::string filename, const void *data, int64_t size) const =0
Append data to a file, creating it if it doesn't exist.
virtual void setAndroidSaveExternal(bool useExternal=false)
This sets the save location on Android. False for internal, true for external
Definition Filesystem.h:63
virtual void setSymlinksEnabled(bool enable)=0
Enable or disable symbolic link support in love.filesystem.
virtual std::string getSource() const =0
Gets the path to the game source. Returns a 0-length string if the source has not been set.
virtual std::vector< std::string > & getCRequirePath()=0
virtual bool watch(std::string path)=0
Watch a virtual or absolute OS path (file or directory). File watches monitor the parent directory an...
Definition Build.cpp:11