载入中...
搜索中...
未找到
eve::filesystem::FileWatch类 参考

OS directory watch with a main-thread event queue. Desktop/mobile: backed by Poco::DirectoryWatcher (see FileWatch.cpp). WebGPU (Emscripten): the browser VFS has no native file watching, so this is a no-op stub — add()/remove() return false, poll() returns false. 更多...

#include <FileWatch.h>

struct  DirWatch
 
struct  Event
 

Public 成员函数

 FileWatch ()
 
 ~FileWatch ()
 
 FileWatch (const FileWatch &)=delete
 
FileWatchoperator= (const FileWatch &)=delete
 
bool add (const std::string &realDir, const std::string &filterName, const std::string &reportPath, int scanInterval=1)
 
bool remove (const std::string &reportPath)
 Remove by reportPath previously passed to add().
 
void clear ()
 
int count () const
 
bool poll (Event &out)
 Pop one event; false if empty.
 

详细描述

OS directory watch with a main-thread event queue. Desktop/mobile: backed by Poco::DirectoryWatcher (see FileWatch.cpp). WebGPU (Emscripten): the browser VFS has no native file watching, so this is a no-op stub — add()/remove() return false, poll() returns false.

在文件 FileWatch.h23 行定义.

构造及析构函数说明

◆ FileWatch() [1/2]

eve::filesystem::FileWatch::FileWatch ( )
default

◆ ~FileWatch()

eve::filesystem::FileWatch::~FileWatch ( )

在文件 FileWatch.cpp62 行定义.

引用了 clear().

◆ FileWatch() [2/2]

eve::filesystem::FileWatch::FileWatch ( const FileWatch )
delete

成员函数说明

◆ add()

bool eve::filesystem::FileWatch::add ( const std::string &  realDir,
const std::string &  filterName,
const std::string &  reportPath,
int  scanInterval = 1 
)
参数
realDirAbsolute OS directory to watch.
filterNameEmpty = all entries; otherwise only this basename.
reportPathPath reported in Event::path (virtual / user path).
scanIntervalSeconds for platforms that poll (Darwin MODIFIED).

在文件 FileWatch.cpp64 行定义.

引用了 dir, f, eve::filesystem::FileWatch::DirWatch::filters, ok, eve::filesystem::FileWatch::DirWatch::refs , 以及 eve::filesystem::FileWatch::DirWatch::watcher.

被这些函数引用 eve::filesystem::physfs::Filesystem::watch().

◆ clear()

void eve::filesystem::FileWatch::clear ( )

在文件 FileWatch.cpp189 行定义.

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

◆ count()

int eve::filesystem::FileWatch::count ( ) const

在文件 FileWatch.cpp211 行定义.

◆ operator=()

FileWatch & eve::filesystem::FileWatch::operator= ( const FileWatch )
delete

◆ poll()

bool eve::filesystem::FileWatch::poll ( Event out)

Pop one event; false if empty.

在文件 FileWatch.cpp220 行定义.

◆ remove()

bool eve::filesystem::FileWatch::remove ( const std::string &  reportPath)

Remove by reportPath previously passed to add().

在文件 FileWatch.cpp152 行定义.

引用了 dir, eve::filesystem::FileWatch::DirWatch::filters , 以及 eve::filesystem::FileWatch::DirWatch::refs.

被这些函数引用 eve::filesystem::physfs::Filesystem::unwatch().


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