From 7069fbbebc750a7c8a64adc8c30269527cbec9bd Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 12 Apr 2017 22:48:52 -0700 Subject: [vcpkg] Remove+indirect nearly all uses of iostreams --- toolsrc/src/commands_import.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_import.cpp') 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) -- cgit v1.2.3