27 if (format.name == name)
40 if (need_writer && !format.make_writer)
42 if (std::ranges::find(format.extensions, ext) != format.extensions.end())
54 if (format.probe && format.make_reader && format.probe(head->bytes, head->file_size))
62 const std::string& filepath, std::string_view format)
const
69 const std::string& filepath, std::string_view format)
const
77 std::vector<std::string> names;
80 names.push_back(format.name);
Cycle Behavior: The for_cycles(N) configuration controls how many times the capture operation execute...
static std::string resolve_path(const std::string &filepath)
Resolve a filepath against the project source root if not found as-is.
std::string lower_extension(const std::string &path)
Lowercase extension of a path without its dot.
std::optional< FileHead > read_file_head(const std::string &path, size_t limit)
Read up to limit leading bytes of a file, or std::nullopt if it cannot be opened.