diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-06-27 16:29:16 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-06-27 23:15:48 -0700 |
| commit | 3314845a92852d3461a86d15ca5d6b2a6ca859eb (patch) | |
| tree | 61c0f0d53c4ffec0dbd49d72305e2c0a0bc2ae0b /toolsrc/include | |
| parent | 0ad79a67c76a7fbb26142b319eef069d7ba71557 (diff) | |
| download | vcpkg-3314845a92852d3461a86d15ca5d6b2a6ca859eb.tar.gz vcpkg-3314845a92852d3461a86d15ca5d6b2a6ca859eb.zip | |
[vcpkg] Remove calls to where.exe to improve startup performance
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/files.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 1518d2b5c..eee910841 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -57,13 +57,9 @@ namespace vcpkg::Files std::error_code& ec) = 0; virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; - inline void write_contents(const fs::path& file_path, const std::string& data) - { - std::error_code ec; - write_contents(file_path, data, ec); - Checks::check_exit( - VCPKG_LINE_INFO, !ec, "error while writing file: %s: %s", file_path.u8string(), ec.message()); - } + virtual std::vector<fs::path> find_from_PATH(const std::string& name) const = 0; + + void write_contents(const fs::path& file_path, const std::string& data); }; Filesystem& get_real_filesystem(); @@ -73,6 +69,4 @@ namespace vcpkg::Files bool has_invalid_chars_for_filesystem(const std::string& s); void print_paths(const std::vector<fs::path>& paths); - - std::vector<fs::path> find_from_PATH(const std::string& name); } |
