PhysFS 文件系统后端实现(挂载/解挂、读写、热重载)。 更多...
#include <Filesystem.h>
Public 成员函数 | |
| Filesystem () | |
| Filesystem. | |
| ~Filesystem () override | |
| Filesystem. | |
| void | init (const char *arg0) override |
| Initializes init. | |
| void | setFused (bool value) override |
| Sets the fused. | |
| bool | isFused () const override |
| True when fused. | |
| bool | setupWriteDirectory () override |
| Setup write directory. | |
| bool | setIdentity (std::string ident, bool appendToPath=false) override |
| Sets the identity. | |
| std::string | getIdentity () const override |
| Returns the identity. | |
| bool | setSource (std::string source) override |
| Sets the source. | |
| bool | setSourceFromMemory (const void *data, size_t size) override |
| Sets the source from memory. | |
| std::string | getSource () const override |
| Returns the source. | |
| bool | mount (std::string archive, std::string mountpoint, bool appendToPath=false) override |
| Mounts mount. | |
| bool | mount (Data *data, std::string archivename, std::string mountpoint, bool appendToPath=false) override |
| Mounts mount. | |
| bool | mountRealDirectory (std::string realDir, std::string mountpoint, bool appendToPath=false) override |
| Mounts real directory. | |
| bool | unmountRealDirectory (std::string realDir) override |
| Unmounts real directory. | |
| bool | unmount (std::string archive) override |
| Unmounts unmount. | |
| bool | unmount (Data *data) override |
| Unmounts unmount. | |
| filesystem::File * | newFile (std::string filename) const override |
| Creates a file. @ownership Caller deletes unless documented otherwise. | |
| std::string | getWorkingDirectory () override |
| Returns the working directory. | |
| std::string | getUserDirectory () override |
| Returns the user directory. | |
| std::string | getAppdataDirectory () override |
| Returns the appdata directory. | |
| std::string | getSaveDirectory () override |
| Returns the save directory. | |
| std::string | getSourceBaseDirectory () const override |
| Returns the source base directory. | |
| std::string | getRealDirectory (std::string filename) const override |
| Returns the real directory. | |
| bool | getInfo (std::string filepath, Info &info) const override |
| Returns the info. | |
| bool | createDirectory (std::string dir) override |
| Creates directory. | |
| bool | remove (std::string file) override |
| Removes remove. | |
| FileData * | read (std::string filename, int64_t size=File::ALL) const override |
| Reads read. | |
| void | write (std::string filename, const void *data, int64_t size) const override |
| Writes write. | |
| void | append (std::string filename, const void *data, int64_t size) const override |
| Append. | |
| std::vector< std::string > | getDirectoryItems (std::string dir) override |
| Returns the directory items. | |
| void | setSymlinksEnabled (bool enable) override |
| Sets the symlinks enabled. | |
| bool | areSymlinksEnabled () const override |
| Are symlinks enabled. | |
| std::vector< std::string > & | getRequirePath () override |
| Returns the require path. | |
| std::vector< std::string > & | getCRequirePath () override |
| Returns the c require path. | |
| void | allowMountingForPath (const std::string &path) override |
| Allow mounting for path. | |
| bool | watch (std::string path) override |
| Watches watch. | |
| eve::Result< void > | watchRealDirectory (std::string realDir, std::string reportPath) override |
| Watches real directory. | |
| bool | unwatch (std::string path) override |
| Stops watching unwatch. | |
| void | unwatchAll () override |
| Stops watching all. | |
| int | getWatchCount () const override |
| Returns the watch count. | |
| std::string | pollWatch () override |
| Polls watch. | |
| std::string | getLastWatchPath () const override |
| Returns the last watch path. | |
| std::string | getLastWatchRealPath () const override |
| Returns the last watch real path. | |
Public 成员函数 继承自 eve::filesystem::Filesystem | |
| Module_REG (Filesystem) | |
| Filesystem () | |
| bool | readFile (const std::string &path, std::vector< uint8_t > &out) override |
| Reads an entire file. | |
| bool | writeFile (const std::string &path, const void *data, size_t size) override |
| Writes bytes to a file. | |
| bool | fileExists (const std::string &path) override |
| True when the path exists (file or directory). | |
| virtual void | setAndroidSaveExternal (bool external=false) |
| This sets the save location on Android. False for internal, true for external | |
| virtual bool | isAndroidSaveExternal () const |
| Gets whether the Android save is external. Returns a bool. | |
| virtual FileData * | newFileData (const void *data, std::string filename, size_t size) const |
| Creates a new FileData object. Data will be copied. | |
| bool | writeText (const std::string &filename, const std::string &text) const |
| Write a UTF-8 string to a file in the configured save directory. | |
| eve::Result< void > | writeTextAtomic (std::string_view filename, std::string_view text) |
| Durably replace a UTF-8 text file in the configured save directory. | |
| std::string | readText (const std::string &filename) const |
| Read a UTF-8 string from the virtual filesystem. | |
| bool | mountExternalReadOnly (const std::string &path, const std::string &mountpoint) |
| Mount an external OS directory for read-only asset access. | |
| virtual bool | isRealDirectory (const std::string &path) const |
| Gets whether the given full (OS-dependent) path is a directory. | |
| virtual std::string | getExecutablePath () const |
| Gets the full platform-dependent path to the executable. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
Public 成员函数 继承自 eve::service::IFileSystem | |
| virtual | ~IFileSystem ()=default |
| Releases IFileSystem resources. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::service::IFileSystem | |
| static constexpr const char * | capabilityName = "IFileSystem" |
详细描述
PhysFS 文件系统后端实现(挂载/解挂、读写、热重载)。
在文件 Filesystem.h 第 21 行定义.
构造及析构函数说明
◆ Filesystem()
| eve::filesystem::physfs::Filesystem::Filesystem | ( | ) |
◆ ~Filesystem()
|
overridevirtual |
成员函数说明
◆ allowMountingForPath()
|
overridevirtual |
◆ append()
|
overridevirtual |
◆ areSymlinksEnabled()
|
overridevirtual |
◆ createDirectory()
|
overridevirtual |
Creates directory.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 573 行定义.
引用了 dir , 以及 setupWriteDirectory().
被这些函数引用 setupWriteDirectory().
◆ getAppdataDirectory()
|
overridevirtual |
Returns the appdata directory.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 489 行定义.
引用了 getUserDirectory().
被这些函数引用 setIdentity().
◆ getCRequirePath()
|
overridevirtual |
◆ getDirectoryItems()
|
overridevirtual |
Returns the directory items.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 620 行定义.
引用了 dir.
◆ getIdentity()
|
overridevirtual |
◆ getInfo()
|
overridevirtual |
◆ getLastWatchPath()
|
overridevirtual |
◆ getLastWatchRealPath()
|
overridevirtual |
◆ getRealDirectory()
|
overridevirtual |
◆ getRequirePath()
|
overridevirtual |
◆ getSaveDirectory()
|
overridevirtual |
◆ getSource()
|
overridevirtual |
◆ getSourceBaseDirectory()
|
overridevirtual |
◆ getUserDirectory()
|
overridevirtual |
Returns the user directory.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 465 行定义.
引用了 dir.
被这些函数引用 getAppdataDirectory() , 以及 setupWriteDirectory().
◆ getWatchCount()
|
overridevirtual |
◆ getWorkingDirectory()
|
overridevirtual |
Returns the working directory.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 444 行定义.
引用了 EVENGINE_MAX_PATH.
◆ init()
|
overridevirtual |
Initializes init.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 106 行定义.
引用了 setSymlinksEnabled().
被这些函数引用 Filesystem().
◆ isFused()
|
overridevirtual |
◆ mount() [1/2]
|
overridevirtual |
◆ mount() [2/2]
|
overridevirtual |
Mounts mount.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 319 行定义.
引用了 EVENGINE_PATH_SEPARATOR, getSourceBaseDirectory() , 以及 isFused().
◆ mountRealDirectory()
|
overridevirtual |
◆ newFile()
|
overridevirtual |
Creates a file. @ownership Caller deletes unless documented otherwise.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 442 行定义.
◆ pollWatch()
|
overridevirtual |
Polls watch.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 846 行定义.
引用了 eve::filesystem::FileWatch::Event::kind, eve::filesystem::FileWatch::Event::path , 以及 eve::filesystem::FileWatch::Event::realPath.
◆ read()
◆ remove()
|
overridevirtual |
Removes remove.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 583 行定义.
引用了 file , 以及 setupWriteDirectory().
◆ setFused()
|
overridevirtual |
◆ setIdentity()
|
overridevirtual |
Sets the identity.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 125 行定义.
引用了 EVENGINE_APPDATA_FOLDER, EVENGINE_APPDATA_PREFIX, EVENGINE_PATH_SEPARATOR, getAppdataDirectory() , 以及 eve::filesystem::Filesystem::isAndroidSaveExternal().
◆ setSource()
|
overridevirtual |
◆ setSourceFromMemory()
|
overridevirtual |
◆ setSymlinksEnabled()
|
overridevirtual |
Sets the symlinks enabled.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 634 行定义.
被这些函数引用 init().
◆ setupWriteDirectory()
|
overridevirtual |
Setup write directory.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 272 行定义.
引用了 createDirectory(), getUserDirectory() , 以及 length.
被这些函数引用 createDirectory() , 以及 remove().
◆ unmount() [1/2]
|
overridevirtual |
◆ unmount() [2/2]
|
overridevirtual |
Unmounts unmount.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 391 行定义.
引用了 EVENGINE_PATH_SEPARATOR, getSourceBaseDirectory() , 以及 isFused().
被这些函数引用 unmount().
◆ unmountRealDirectory()
|
overridevirtual |
◆ unwatch()
|
overridevirtual |
Stops watching unwatch.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 835 行定义.
引用了 path , 以及 eve::filesystem::FileWatch::remove().
◆ unwatchAll()
|
overridevirtual |
Stops watching all.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 837 行定义.
被这些函数引用 ~Filesystem().
◆ watch()
|
overridevirtual |
Watches watch.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 812 行定义.
引用了 eve::filesystem::FileWatch::add(), filter , 以及 path.
◆ watchRealDirectory()
|
overridevirtual |
Watches real directory.
实现了 eve::filesystem::Filesystem.
在文件 Filesystem.cpp 第 818 行定义.
引用了 eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::InvalidArgument, eve::filesystem::Filesystem::isRealDirectory(), eve::NotFound , 以及 eve::Result< T >::success().
◆ write()
|
overridevirtual |
该类的文档由以下文件生成:
- src/modules/filesystem/physfs/Filesystem.h
- src/modules/filesystem/physfs/Filesystem.cpp
Public 成员函数 继承自