Skip to content

Commit

Permalink
Fix write file ultilty
Browse files Browse the repository at this point in the history
CURA-10561
  • Loading branch information
casperlamboo committed Oct 25, 2023
1 parent 4a0aaef commit d51d1dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/dulcificum/utils/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace details

[[nodiscard]] std::optional<std::string> readFile(const std::filesystem::path& filename) noexcept;

[[nodiscard]] bool writeFile(const std::filesystem::path& filename, std::string& content) noexcept;

} // namespace dulcificum::utils

#endif // INCLUDE_DULCIFICUM_UTILS_IO_H
2 changes: 1 addition & 1 deletion src/utils/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace details
[[nodiscard]] bool writeFile(const std::filesystem::path& filename, std::string& content) noexcept
{
std::ofstream outfile { filename };
outfile << "test";
outfile << content;
outfile.close();
return true;
}
Expand Down

0 comments on commit d51d1dc

Please sign in to comment.