aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_import.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-04-12 22:48:52 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-04-12 22:48:52 -0700
commit7069fbbebc750a7c8a64adc8c30269527cbec9bd (patch)
tree94d08f8fd3f04be1167f274c7aab37d0100a693b /toolsrc/src/commands_import.cpp
parent7326b6c64dc6b04b6d8512f13dddf67bf7498bf1 (diff)
downloadvcpkg-7069fbbebc750a7c8a64adc8c30269527cbec9bd.tar.gz
vcpkg-7069fbbebc750a7c8a64adc8c30269527cbec9bd.zip
[vcpkg] Remove+indirect nearly all uses of iostreams
Diffstat (limited to 'toolsrc/src/commands_import.cpp')
-rw-r--r--toolsrc/src/commands_import.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/toolsrc/src/commands_import.cpp b/toolsrc/src/commands_import.cpp
index 1fcc3b3a8..b65f636eb 100644
--- a/toolsrc/src/commands_import.cpp
+++ b/toolsrc/src/commands_import.cpp
@@ -72,13 +72,14 @@ namespace vcpkg::Commands::Import
static void do_import(const VcpkgPaths& paths, const fs::path& include_directory, const fs::path& project_directory, const BinaryParagraph& control_file_data)
{
+ auto& fs = paths.get_filesystem();
fs::path library_destination_path = paths.package_dir(control_file_data.spec);
std::error_code ec;
- paths.get_filesystem().create_directory(library_destination_path, ec);
+ fs.create_directory(library_destination_path, ec);
place_library_files_in(paths.get_filesystem(), include_directory, project_directory, library_destination_path);
fs::path control_file_path = library_destination_path / "CONTROL";
- std::ofstream(control_file_path) << control_file_data;
+ fs.write_contents(control_file_path, Strings::serialize(control_file_data));
}
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)