mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibCore: Move Stream-based file into the Core
namespace
This commit is contained in:
parent
a96339b72b
commit
606a3982f3
218 changed files with 748 additions and 643 deletions
|
@ -1460,12 +1460,12 @@ void TextEditor::timer_event(Core::TimerEvent&)
|
|||
|
||||
ErrorOr<void> TextEditor::write_to_file(StringView path)
|
||||
{
|
||||
auto file = TRY(Core::Stream::File::open(path, Core::Stream::OpenMode::Write | Core::Stream::OpenMode::Truncate));
|
||||
auto file = TRY(Core::File::open(path, Core::File::OpenMode::Write | Core::File::OpenMode::Truncate));
|
||||
TRY(write_to_file(*file));
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> TextEditor::write_to_file(Core::Stream::File& file)
|
||||
ErrorOr<void> TextEditor::write_to_file(Core::File& file)
|
||||
{
|
||||
off_t file_size = 0;
|
||||
if (line_count() == 1 && line(0).is_empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue