Template
Rename function
This commit is contained in:
1 parent
58f48ac385
commit
58337745c3
3 files changed
+4
-4
No files matched your search
@@ -26,8 +26,8 @@ int main(int argc, char* argv[])
|
||||
});
|
||||
|
||||
arg.with("--file=", [](std::filesystem::path file_path) {
|
||||
const std::string file_contents = core::file_stream::file_contents_as_string(file_path);
|
||||
std::println("{}", file_contents);
|
||||
const std::string file_content = core::file_stream::file_content_as_string(file_path);
|
||||
std::println("{}", file_content);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ core::file_stream core::file_stream::open_for_reading(const std::filesystem::pat
|
||||
return stream;
|
||||
}
|
||||
|
||||
std::string core::file_stream::file_contents_as_string(const std::filesystem::path& file_path)
|
||||
std::string core::file_stream::file_content_as_string(const std::filesystem::path& file_path)
|
||||
{
|
||||
file_stream stream = open_for_reading(file_path);
|
||||
return stream.read_all_as_string();
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
~file_stream();
|
||||
|
||||
static file_stream open_for_reading(const std::filesystem::path& file_path);
|
||||
static std::string file_contents_as_string(const std::filesystem::path& file_path);
|
||||
static std::string file_content_as_string(const std::filesystem::path& file_path);
|
||||
|
||||
std::string read_all_as_string();
|
||||
void close();
|
||||
|
||||
Reference in new issue
Block a user