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 | |
| FileWatch & | operator= (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.h 第 23 行定义.
构造及析构函数说明
◆ FileWatch() [1/2]
|
default |
◆ ~FileWatch()
| eve::filesystem::FileWatch::~FileWatch | ( | ) |
在文件 FileWatch.cpp 第 62 行定义.
引用了 clear().
◆ FileWatch() [2/2]
|
delete |
成员函数说明
◆ add()
| bool eve::filesystem::FileWatch::add | ( | const std::string & | realDir, |
| const std::string & | filterName, | ||
| const std::string & | reportPath, | ||
| int | scanInterval = 1 |
||
| ) |
- 参数
-
realDir Absolute OS directory to watch. filterName Empty = all entries; otherwise only this basename. reportPath Path reported in Event::path (virtual / user path). scanInterval Seconds for platforms that poll (Darwin MODIFIED).
在文件 FileWatch.cpp 第 64 行定义.
引用了 dir, f, eve::filesystem::FileWatch::DirWatch::filters, ok, eve::filesystem::FileWatch::DirWatch::refs , 以及 eve::filesystem::FileWatch::DirWatch::watcher.
◆ clear()
| void eve::filesystem::FileWatch::clear | ( | ) |
在文件 FileWatch.cpp 第 189 行定义.
被这些函数引用 ~FileWatch().
◆ count()
| int eve::filesystem::FileWatch::count | ( | ) | const |
在文件 FileWatch.cpp 第 211 行定义.
◆ operator=()
◆ poll()
| bool eve::filesystem::FileWatch::poll | ( | Event & | out | ) |
Pop one event; false if empty.
在文件 FileWatch.cpp 第 220 行定义.
◆ remove()
| bool eve::filesystem::FileWatch::remove | ( | const std::string & | reportPath | ) |
Remove by reportPath previously passed to add().
在文件 FileWatch.cpp 第 152 行定义.
引用了 dir, eve::filesystem::FileWatch::DirWatch::filters , 以及 eve::filesystem::FileWatch::DirWatch::refs.
该类的文档由以下文件生成:
- src/modules/filesystem/FileWatch.h
- src/modules/filesystem/FileWatch.cpp