diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-12 22:48:52 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-12 22:48:52 -0700 |
| commit | 7069fbbebc750a7c8a64adc8c30269527cbec9bd (patch) | |
| tree | 94d08f8fd3f04be1167f274c7aab37d0100a693b /toolsrc/src/commands_import.cpp | |
| parent | 7326b6c64dc6b04b6d8512f13dddf67bf7498bf1 (diff) | |
| download | vcpkg-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.cpp | 5 |
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) |
