mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
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:
@@ -676,6 +676,7 @@ struct IDLOptions {
|
||||
bool binary_schema_comments;
|
||||
bool binary_schema_builtins;
|
||||
bool binary_schema_gen_embed;
|
||||
bool binary_schema_absolute_paths;
|
||||
std::string go_import;
|
||||
std::string go_namespace;
|
||||
std::string go_module_name;
|
||||
@@ -796,6 +797,7 @@ struct IDLOptions {
|
||||
binary_schema_comments(false),
|
||||
binary_schema_builtins(false),
|
||||
binary_schema_gen_embed(false),
|
||||
binary_schema_absolute_paths(false),
|
||||
protobuf_ascii_alike(false),
|
||||
size_prefixed(false),
|
||||
force_defaults(false),
|
||||
|
||||
@@ -479,6 +479,11 @@ std::string PosixPath(const std::string &path);
|
||||
// creating dirs for any parts of the path that don't exist yet.
|
||||
void EnsureDirExists(const std::string &filepath);
|
||||
|
||||
// Obtains the relative or absolute path.
|
||||
std::string FilePath(const std::string &project,
|
||||
const std::string &filePath,
|
||||
bool absolute);
|
||||
|
||||
// Obtains the absolute path from any other path.
|
||||
// Returns the input path if the absolute path couldn't be resolved.
|
||||
std::string AbsolutePath(const std::string &filepath);
|
||||
|
||||
Reference in New Issue
Block a user