#pragma once #include #include "BinaryParagraph.h" #include "VcpkgPaths.h" #include "VersionT.h" #include "filesystem_fs.h" #include "vcpkg_Parse.h" #include "vcpkg_expected.h" namespace vcpkg::Paragraphs { using RawParagraph = Parse::RawParagraph; Expected get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path); Expected> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path); Expected parse_single_paragraph(const std::string& str); Expected> parse_paragraphs(const std::string& str); Parse::ParseExpected try_load_port(const Files::Filesystem& fs, const fs::path& control_path); Expected try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { std::vector> paragraphs; std::vector> errors; }; LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); std::vector> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir); std::map load_all_port_names_and_versions(const Files::Filesystem& fs, const fs::path& ports_dir); }