Add absolute file names option to BFBS (#8055)

* Add absolute file names option (#1)

* Use ternary style for if

---------

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
James Courtney
2023-11-19 10:58:03 -08:00
committed by GitHub
parent d3055a97e7
commit 7d6d99c6be
5 changed files with 21 additions and 6 deletions

View File

@@ -336,6 +336,10 @@ void EnsureDirExists(const std::string &filepath) {
// clang-format on
}
std::string FilePath(const std::string& project, const std::string& filePath, bool absolute) {
return (absolute) ? AbsolutePath(filePath) : RelativeToRootPath(project, filePath);
}
std::string AbsolutePath(const std::string &filepath) {
// clang-format off