载入中...
搜索中...
未找到
Filesystem.h
浏览该文件的文档.
150 virtual bool mount(Data *data, std::string archivename, std::string mountpoint, bool appendToPath = false) = 0;
160 virtual bool mountRealDirectory(std::string realDir, std::string mountpoint, bool appendToPath = false) = 0;
Move-only, checked operation results for the common layer.
Data buffer paired with a filename (used for type identification).
Definition FileData.h:14
A File interface, providing generic means of reading from and writing to files.
Definition File.h:14
virtual eve::Result< void > watchRealDirectory(std::string realDir, std::string reportPath)=0
Watch a real OS directory and report events under a virtual-relative path.
virtual bool unmount(std::string archive)=0
Unmounts a previously mounted archive.
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 void init(const char *arg0)=0
virtual bool unmount(Data *data)=0
Unmounts a previously mounted in-memory archive.
virtual bool isAndroidSaveExternal() const
Gets whether the Android save is external. Returns a bool.
Definition Filesystem.h:109
virtual std::string getUserDirectory()=0
Gets the user home directory.
virtual bool getInfo(std::string filepath, Info &info) const =0
Gets information about the item at the specified filepath. Returns false if nothing exists at the pat...
virtual bool mount(Data *data, std::string archivename, std::string mountpoint, bool appendToPath=false)=0
virtual bool setSource(std::string source)=0
Sets the path to the game source. This can only be set once.
virtual bool setIdentity(std::string ident, bool appendToPath=false)=0
Sets the name of the save folder.
virtual bool mountRealDirectory(std::string realDir, std::string mountpoint, bool appendToPath=false)=0
virtual std::vector< std::string > & getRequirePath()=0
virtual std::string getLastWatchRealPath() const =0
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.
bool readFile(const std::string &path, std::vector< uint8_t > &out) override
Reads an entire file.
Definition Filesystem.h:58
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().
bool fileExists(const std::string &path) override
True when the path exists (file or directory).
Definition Filesystem.h:80
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 setSourceFromMemory(const void *data, size_t size)=0
Loads the game source from a packaged archive (.eve / zip) held entirely in memory and mounts it at "...
virtual std::string getLastWatchPath() const =0
virtual bool remove(std::string file)=0
Removes a file (or directory).
virtual bool mount(std::string archive, std::string mountpoint, bool appendToPath=false)=0
Mounts an archive (path or in-memory Data) at a virtual mountpoint.
Module_REG(Filesystem)
virtual bool createDirectory(std::string dir)=0
Creates a directory. Write dir must be set.
virtual std::string getIdentity() const =0
virtual bool unmountRealDirectory(std::string realDir)=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.
bool writeFile(const std::string &path, const void *data, size_t size) override
Writes bytes to a file.
Definition Filesystem.h:71
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 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 void setAndroidSaveExternal(bool external=false)
This sets the save location on Android. False for internal, true for external
Definition Filesystem.h:103
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...
Minimal file read / write / existence surface. Providers: eve::filesystem::Filesystem....
Definition ServiceInterfaces.h:23
Definition File.cpp:17