载入中...
搜索中...
未找到
eve::filesystem::physfs::Filesystem类 参考final

PhysFS 文件系统后端实现(挂载/解挂、读写、热重载)。 更多...

#include <Filesystem.h>

类 eve::filesystem::physfs::Filesystem 继承关系图:
eve::filesystem::Filesystem eve::Module eve::service::IFileSystem

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.

在文件 Filesystem.cpp 第 78 行定义.

引用了 c, getModInst , 以及 init().

◆ ~Filesystem()

eve::filesystem::physfs::Filesystem::~Filesystem ( )
overridevirtual

Filesystem.

重载 eve::filesystem::Filesystem .

在文件 Filesystem.cpp 第 91 行定义.

引用了 unwatchAll().

成员函数说明

◆ allowMountingForPath()

void eve::filesystem::physfs::Filesystem::allowMountingForPath ( const std::string &  path)
overridevirtual

Allow mounting for path.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 650 行定义.

引用了 path.

◆ append()

void eve::filesystem::physfs::Filesystem::append ( std::string  filename,
const void *  data,
int64_t  size 
) const
overridevirtual

Append.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 611 行定义.

引用了 file , 以及 size.

◆ areSymlinksEnabled()

bool eve::filesystem::physfs::Filesystem::areSymlinksEnabled ( ) const
overridevirtual

Are symlinks enabled.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 640 行定义.

◆ createDirectory()

bool eve::filesystem::physfs::Filesystem::createDirectory ( std::string  dir)
overridevirtual

Creates directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 573 行定义.

引用了 dir , 以及 setupWriteDirectory().

被这些函数引用 setupWriteDirectory().

◆ getAppdataDirectory()

std::string eve::filesystem::physfs::Filesystem::getAppdataDirectory ( )
overridevirtual

Returns the appdata directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 489 行定义.

引用了 getUserDirectory().

被这些函数引用 setIdentity().

◆ getCRequirePath()

std::vector< std::string > & eve::filesystem::physfs::Filesystem::getCRequirePath ( )
overridevirtual

Returns the c require path.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 648 行定义.

◆ getDirectoryItems()

std::vector< std::string > eve::filesystem::physfs::Filesystem::getDirectoryItems ( std::string  dir)
overridevirtual

Returns the directory items.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 620 行定义.

引用了 dir.

◆ getIdentity()

std::string eve::filesystem::physfs::Filesystem::getIdentity ( ) const
overridevirtual

Returns the identity.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 183 行定义.

◆ getInfo()

bool eve::filesystem::physfs::Filesystem::getInfo ( std::string  filepath,
Info &  info 
) const
overridevirtual

Returns the info.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 552 行定义.

引用了 info.

◆ getLastWatchPath()

std::string eve::filesystem::physfs::Filesystem::getLastWatchPath ( ) const
overridevirtual

Returns the last watch path.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 859 行定义.

◆ getLastWatchRealPath()

std::string eve::filesystem::physfs::Filesystem::getLastWatchRealPath ( ) const
overridevirtual

Returns the last watch real path.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 860 行定义.

◆ getRealDirectory()

std::string eve::filesystem::physfs::Filesystem::getRealDirectory ( std::string  filename) const
overridevirtual

Returns the real directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 542 行定义.

引用了 dir.

◆ getRequirePath()

std::vector< std::string > & eve::filesystem::physfs::Filesystem::getRequirePath ( )
overridevirtual

Returns the require path.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 646 行定义.

◆ getSaveDirectory()

std::string eve::filesystem::physfs::Filesystem::getSaveDirectory ( )
overridevirtual

Returns the save directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 518 行定义.

◆ getSource()

std::string eve::filesystem::physfs::Filesystem::getSource ( ) const
overridevirtual

Returns the source.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 246 行定义.

◆ getSourceBaseDirectory()

std::string eve::filesystem::physfs::Filesystem::getSourceBaseDirectory ( ) const
overridevirtual

Returns the source base directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 520 行定义.

被这些函数引用 mount() , 以及 unmount().

◆ getUserDirectory()

std::string eve::filesystem::physfs::Filesystem::getUserDirectory ( )
overridevirtual

Returns the user directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 465 行定义.

引用了 dir.

被这些函数引用 getAppdataDirectory() , 以及 setupWriteDirectory().

◆ getWatchCount()

int eve::filesystem::physfs::Filesystem::getWatchCount ( ) const
overridevirtual

Returns the watch count.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 841 行定义.

◆ getWorkingDirectory()

std::string eve::filesystem::physfs::Filesystem::getWorkingDirectory ( )
overridevirtual

Returns the working directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 444 行定义.

引用了 EVENGINE_MAX_PATH.

◆ init()

void eve::filesystem::physfs::Filesystem::init ( const char *  arg0)
overridevirtual

Initializes init.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 106 行定义.

引用了 setSymlinksEnabled().

被这些函数引用 Filesystem().

◆ isFused()

bool eve::filesystem::physfs::Filesystem::isFused ( ) const
overridevirtual

True when fused.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 120 行定义.

被这些函数引用 mount() , 以及 unmount().

◆ mount() [1/2]

bool eve::filesystem::physfs::Filesystem::mount ( Data *  data,
std::string  archivename,
std::string  mountpoint,
bool  appendToPath = false 
)
overridevirtual

Mounts mount.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 356 行定义.

◆ mount() [2/2]

bool eve::filesystem::physfs::Filesystem::mount ( std::string  archive,
std::string  mountpoint,
bool  appendToPath = false 
)
overridevirtual

Mounts mount.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 319 行定义.

引用了 EVENGINE_PATH_SEPARATOR, getSourceBaseDirectory() , 以及 isFused().

◆ mountRealDirectory()

bool eve::filesystem::physfs::Filesystem::mountRealDirectory ( std::string  realDir,
std::string  mountpoint,
bool  appendToPath = false 
)
overridevirtual

Mounts real directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 367 行定义.

引用了 eve::filesystem::Filesystem::isRealDirectory().

◆ newFile()

filesystem::File * eve::filesystem::physfs::Filesystem::newFile ( std::string  filename) const
overridevirtual

Creates a file. @ownership Caller deletes unless documented otherwise.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 442 行定义.

◆ pollWatch()

std::string eve::filesystem::physfs::Filesystem::pollWatch ( )
overridevirtual

◆ read()

FileData * eve::filesystem::physfs::Filesystem::read ( std::string  filename,
int64_t  size = File::ALL 
) const
overridevirtual

Reads read.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 593 行定义.

引用了 file , 以及 size.

◆ remove()

bool eve::filesystem::physfs::Filesystem::remove ( std::string  file)
overridevirtual

Removes remove.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 583 行定义.

引用了 file , 以及 setupWriteDirectory().

◆ setFused()

void eve::filesystem::physfs::Filesystem::setFused ( bool  value)
overridevirtual

Sets the fused.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 114 行定义.

引用了 value.

◆ setIdentity()

bool eve::filesystem::physfs::Filesystem::setIdentity ( std::string  ident,
bool  appendToPath = false 
)
overridevirtual

◆ setSource()

bool eve::filesystem::physfs::Filesystem::setSource ( std::string  source)
overridevirtual

Sets the source.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 185 行定义.

引用了 source.

◆ setSourceFromMemory()

bool eve::filesystem::physfs::Filesystem::setSourceFromMemory ( const void *  data,
size_t  size 
)
overridevirtual

Sets the source from memory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 248 行定义.

引用了 owned , 以及 size.

◆ setSymlinksEnabled()

void eve::filesystem::physfs::Filesystem::setSymlinksEnabled ( bool  enable)
overridevirtual

Sets the symlinks enabled.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 634 行定义.

被这些函数引用 init().

◆ setupWriteDirectory()

bool eve::filesystem::physfs::Filesystem::setupWriteDirectory ( )
overridevirtual

Setup write directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 272 行定义.

引用了 createDirectory(), getUserDirectory() , 以及 length.

被这些函数引用 createDirectory() , 以及 remove().

◆ unmount() [1/2]

bool eve::filesystem::physfs::Filesystem::unmount ( Data *  data)
overridevirtual

Unmounts unmount.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 431 行定义.

引用了 unmount().

◆ unmount() [2/2]

bool eve::filesystem::physfs::Filesystem::unmount ( std::string  archive)
overridevirtual

Unmounts unmount.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 391 行定义.

引用了 EVENGINE_PATH_SEPARATOR, getSourceBaseDirectory() , 以及 isFused().

被这些函数引用 unmount().

◆ unmountRealDirectory()

bool eve::filesystem::physfs::Filesystem::unmountRealDirectory ( std::string  realDir)
overridevirtual

Unmounts real directory.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 382 行定义.

引用了 ok.

◆ unwatch()

bool eve::filesystem::physfs::Filesystem::unwatch ( std::string  path)
overridevirtual

Stops watching unwatch.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 835 行定义.

引用了 path , 以及 eve::filesystem::FileWatch::remove().

◆ unwatchAll()

void eve::filesystem::physfs::Filesystem::unwatchAll ( )
overridevirtual

Stops watching all.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 837 行定义.

被这些函数引用 ~Filesystem().

◆ watch()

bool eve::filesystem::physfs::Filesystem::watch ( std::string  path)
overridevirtual

Watches watch.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 812 行定义.

引用了 eve::filesystem::FileWatch::add(), filter , 以及 path.

◆ watchRealDirectory()

eve::Result< void > eve::filesystem::physfs::Filesystem::watchRealDirectory ( std::string  realDir,
std::string  reportPath 
)
overridevirtual

◆ write()

void eve::filesystem::physfs::Filesystem::write ( std::string  filename,
const void *  data,
int64_t  size 
) const
overridevirtual

Writes write.

实现了 eve::filesystem::Filesystem.

在文件 Filesystem.cpp 第 602 行定义.

引用了 file , 以及 size.


该类的文档由以下文件生成: