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_integrate.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_integrate.cpp')
| -rw-r--r-- | toolsrc/src/commands_integrate.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index 60c6b0613..8569fdd79 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -186,7 +186,7 @@ namespace vcpkg::Commands::Integrate if (should_install_system) { const fs::path sys_src_path = tmp_dir / "vcpkg.system.targets"; - std::ofstream(sys_src_path) << create_system_targets_shortcut(); + fs.write_contents(sys_src_path, create_system_targets_shortcut()); const std::string param = Strings::format(R"(/c mkdir "%s" & copy "%s" "%s" /Y > nul)", system_wide_targets_file.parent_path().string(), sys_src_path.string(), system_wide_targets_file.string()); ElevationPromptChoice user_choice = elevated_cmd_execute(param); @@ -205,7 +205,7 @@ namespace vcpkg::Commands::Integrate } const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; - std::ofstream(appdata_src_path) << create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string()); + fs.write_contents(appdata_src_path, create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); auto appdata_dst_path = get_appdata_targets_path(); auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); @@ -266,9 +266,9 @@ namespace vcpkg::Commands::Integrate const std::string nuget_id = get_nuget_id(paths.root); const std::string nupkg_version = "1.0.0"; - std::ofstream(targets_file_path) << create_nuget_targets_file(paths.buildsystems_msbuild_targets); - std::ofstream(props_file_path) << create_nuget_props_file(); - std::ofstream(nuspec_file_path) << create_nuspec_file(paths.root, nuget_id, nupkg_version); + fs.write_contents(targets_file_path, create_nuget_targets_file(paths.buildsystems_msbuild_targets)); + fs.write_contents(props_file_path, create_nuget_props_file()); + fs.write_contents(nuspec_file_path, create_nuspec_file(paths.root, nuget_id, nupkg_version)); // Using all forward slashes for the command line const std::wstring cmd_line = Strings::wformat(LR"("%s" pack -OutputDirectory "%s" "%s" > nul)", nuget_exe.native(), buildsystems_dir.native(), nuspec_file_path.native()); |
