#pragma once // Where the OS wants ephemeral runtime state and persistent user data to live, before // velox appends its own "/velox" subdirectory and applies the shared 0700-and-owned check // (rpc/runtime_dir.cpp — that enforcement is portable POSIX logic and stays there; only // "which base directory" is per-OS). Linux: XDG. macOS: $TMPDIR (runtime) and // ~/Library/Application Support (data) — see docs/08-porting.md "API mapping". #include #include namespace velox::daemon::rpc::platform { // The base directory ephemeral runtime state (sockets, lock files) should live under, // e.g. "$XDG_RUNTIME_DIR" or "/run/user/" on Linux. No trailing slash. std::error_code runtime_base_dir(std::string& out); // The base directory persistent user data should live under, e.g. "$XDG_DATA_HOME" or // "~/.local/share" on Linux. No trailing slash. std::error_code data_base_dir(std::string& out); } // namespace velox::daemon::rpc::platform