MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / tryLockDir

Function tryLockDir

src/storage/shared_memory.cpp:226–231  ·  view source on GitHub ↗

Try to use a directory for lock files. Creates it if needed. Returns true on success, false if the directory cannot be used.

Source from the content-addressed store, hash-verified

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.
226bool 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
233std::filesystem::path getLockDir()
234{

Callers 1

getLockDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected