Files::read_lines() -> Files::read_all_lines()
MODIFY
include/vcpkg_Files.h
include/vcpkg_Files.h
@@ -8,7 +8,7 @@ namespace vcpkg::Files
__interface Filesystem
{
virtual Expected<std::string> read_contents(const fs::path& file_path) const = 0;
- virtual Expected<std::vector<std::string>> read_all_lines(const fs::path& file_path) const = 0;
+ virtual Expected<std::vector<std::string>> read_lines(const fs::path& file_path) const = 0;
virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const = 0;
virtual std::vector<fs::path> recursive_find_all_files_in_dir(const fs::path& dir) const = 0;
virtual std::vector<fs::path> non_recursive_find_all_files_in_dir(const fs::path& dir) const = 0;

MODIFY
src/commands_remove.cpp
src/commands_remove.cpp
@@ -36,7 +36,7 @@ namespace vcpkg::Commands::Remove
pkg.state = InstallState::HALF_INSTALLED;
write_update(paths, pkg);
- auto maybe_lines = fs.read_all_lines(paths.listfile_path(pkg.package));
+ auto maybe_lines = fs.read_lines(paths.listfile_path(pkg.package));
if (auto lines = maybe_lines.get())
{

MODIFY
src/vcpkg_Files.cpp
src/vcpkg_Files.cpp
@@ -32,7 +32,7 @@ namespace vcpkg::Files
return std::move(output);
}
- virtual Expected<std::vector<std::string>> read_all_lines(const fs::path& file_path) const override
+ virtual Expected<std::vector<std::string>> read_lines(const fs::path& file_path) const override
{
std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary);
if (file_stream.fail())

MODIFY
src/vcpkglib.cpp
src/vcpkglib.cpp
@@ -196,7 +196,7 @@ namespace vcpkg
}
const fs::path listfile_path = paths.listfile_path(pgh->package);
- std::vector<std::string> installed_files_of_current_pgh = fs.read_all_lines(listfile_path).value_or_exit(VCPKG_LINE_INFO);
+ std::vector<std::string> installed_files_of_current_pgh = fs.read_lines(listfile_path).value_or_exit(VCPKG_LINE_INFO);
Strings::trim_all_and_remove_whitespace_strings(&installed_files_of_current_pgh);
upgrade_to_slash_terminated_sorted_format(fs, &installed_files_of_current_pgh, listfile_path);

Files::read_lines() -> Files::read_all_lines()