forked from pz4kybsvg/Conception
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
603 B
25 lines
603 B
2 years ago
|
#pragma once
|
||
|
|
||
|
#include <filesystem>
|
||
|
#include <string>
|
||
|
#include <string_view>
|
||
|
|
||
|
namespace drake {
|
||
|
namespace internal {
|
||
|
|
||
|
/* The return type of FindOrCreateDrakeCache(). Exactly one of the two strings
|
||
|
is non-empty. */
|
||
|
struct PathOrError {
|
||
|
/** The absolute path to a writeable, Drake-specific cache directory. */
|
||
|
std::filesystem::path abspath;
|
||
|
/** The error message. */
|
||
|
std::string error;
|
||
|
};
|
||
|
|
||
|
/* Returns the platform-appropriate location for ~/.cache/drake/{subdir},
|
||
|
creating it if necessary. */
|
||
|
PathOrError FindOrCreateCache(std::string_view subdir);
|
||
|
|
||
|
} // namespace internal
|
||
|
} // namespace drake
|