Closed roeas closed 1 year ago
Usage:
void CreateCB(std::string path) { CD_FATAL("Create : {0}.", cd::MoveTemp(path)); } void ModifyCB(std::string path) { CD_FATAL("Modify : {0}.", cd::MoveTemp(path)); } void RenameOldCB(std::string path) { CD_FATAL("RenameOld : {0}.", cd::MoveTemp(path)); } void RenameNewCB(std::string path) { CD_FATAL("RenameNew : {0}.", cd::MoveTemp(path)); } void DeleteCB(std::string path) { CD_FATAL("Delete : {0}.", cd::MoveTemp(path)); }
m_pFileWatcher = std::make_unique<FileWatcher>(CDENGINE_BUILTIN_SHADER_PATH); m_pFileWatcher->EnableWatchSubTree(); m_pFileWatcher->SetFileAddedCallback(CreateCB); m_pFileWatcher->SetFileModifiedCallback(ModifyCB); m_pFileWatcher->SetFileRenamedOldCallback(RenameOldCB); m_pFileWatcher->SetFileRenamedNewCallback(RenameNewCB); m_pFileWatcher->SetFileRemovedCallback(DeleteCB); m_pFileWatcher->Start();
No Chinese support.
Usage:
No Chinese support.