| 97 | } |
| 98 | |
| 99 | void clear(bool remove_root, bool lock = false) const noexcept |
| 100 | { |
| 101 | // Clear cache |
| 102 | if (!vfs::host::remove_all(cache_root + cache_id, cache_root, |
| 103 | &g_mp_sys_dev_hdd1, remove_root, lock)) |
| 104 | { |
| 105 | cellSysutil.fatal( |
| 106 | "cellSysCache: failed to clear cache directory '%s%s' (%s)", |
| 107 | cache_root, cache_id, fs::g_tls_error); |
| 108 | } |
| 109 | |
| 110 | // Poison opened files in /dev_hdd1 to return CELL_EIO on access |
| 111 | if (remove_root) |
| 112 | { |
| 113 | idm::select<lv2_fs_object, lv2_file>([](u32 /*id*/, lv2_file& file) |
| 114 | { |
| 115 | if (file.file && file.mp->flags & lv2_mp_flag::cache) |
| 116 | { |
| 117 | file.lock = 2; |
| 118 | } |
| 119 | }); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | ~syscache_info() noexcept |
| 124 | { |
no outgoing calls
no test coverage detected