diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-15 18:19:22 -0800 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-12-15 18:19:22 -0800 |
| commit | e4548a8cf46b20b8e89ab75ee9201e3b244484ba (patch) | |
| tree | aefa2373cef54fcb03ec5c915473434804fc8fcb /toolsrc/include | |
| parent | 8f397bb8d1bd05a2e1f6d5de808322364100ae5d (diff) | |
| download | vcpkg-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.h | 4 |
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> |
