| 71 | } |
| 72 | |
| 73 | MaaResId ResourceMgr::post_path(PostPathType type, const std::filesystem::path& path) |
| 74 | { |
| 75 | LogInfo << VAR(static_cast<int>(type)) << VAR(path); |
| 76 | |
| 77 | if (!check_stop()) { |
| 78 | return MaaInvalidId; |
| 79 | } |
| 80 | |
| 81 | valid_ = false; |
| 82 | hash_cache_.clear(); |
| 83 | |
| 84 | if (!res_loader_) { |
| 85 | LogError << "res_loader_ is nullptr"; |
| 86 | return MaaInvalidId; |
| 87 | } |
| 88 | |
| 89 | return res_loader_->post(PostPathItem { .type = type, .path = path }); |
| 90 | } |
| 91 | |
| 92 | MaaStatus ResourceMgr::status(MaaResId res_id) const |
| 93 | { |