| 145 | } |
| 146 | |
| 147 | bool DirIsWritable(const fs::path& directory) |
| 148 | { |
| 149 | fs::path tmpFile = GetUniquePath(directory); |
| 150 | |
| 151 | FILE* file = fsbridge::fopen(tmpFile, "a"); |
| 152 | if (!file) return false; |
| 153 | |
| 154 | fclose(file); |
| 155 | remove(tmpFile); |
| 156 | |
| 157 | return true; |
| 158 | } |
| 159 | |
| 160 | bool CheckDiskSpace(const fs::path& dir, uint64_t additional_bytes) |
| 161 | { |