aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-12-15 18:19:22 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-12-15 18:19:22 -0800
commite4548a8cf46b20b8e89ab75ee9201e3b244484ba (patch)
treeaefa2373cef54fcb03ec5c915473434804fc8fcb /toolsrc/include
parent8f397bb8d1bd05a2e1f6d5de808322364100ae5d (diff)
downloadvcpkg-e4548a8cf46b20b8e89ab75ee9201e3b244484ba.tar.gz
vcpkg-e4548a8cf46b20b8e89ab75ee9201e3b244484ba.zip
Add Files::read_all_lines() and Files::write_all_lines()
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg_Files.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg_Files.h b/toolsrc/include/vcpkg_Files.h
index 8b320303d..5e788f7be 100644
--- a/toolsrc/include/vcpkg_Files.h
+++ b/toolsrc/include/vcpkg_Files.h
@@ -14,6 +14,10 @@ namespace vcpkg {namespace Files
expected<std::string> get_contents(const fs::path& file_path) noexcept;
+ expected<std::vector<std::string>> read_all_lines(const fs::path& file_path);
+
+ void write_all_lines(const fs::path& file_path, const std::vector<std::string>& lines);
+
fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename);
template <class Pred>