Try to use a directory for lock files. Creates it if needed. Returns true on success, false if the directory cannot be used.
| 224 | // Try to use a directory for lock files. Creates it if needed. |
| 225 | // Returns true on success, false if the directory cannot be used. |
| 226 | bool tryLockDir(const std::filesystem::path &dir) |
| 227 | { |
| 228 | std::error_code ec; |
| 229 | std::filesystem::create_directories(dir, ec); |
| 230 | return !ec && std::filesystem::is_directory(dir, ec) && !ec; |
| 231 | } |
| 232 | |
| 233 | std::filesystem::path getLockDir() |
| 234 | { |