diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/stream/file.cpp | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
download | ydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 of 2.
Diffstat (limited to 'util/stream/file.cpp')
-rw-r--r-- | util/stream/file.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/stream/file.cpp b/util/stream/file.cpp index dfce45c002..dc5d2f6311 100644 --- a/util/stream/file.cpp +++ b/util/stream/file.cpp @@ -3,7 +3,7 @@ #include <util/memory/blob.h> #include <util/generic/yexception.h> -TUnbufferedFileInput::TUnbufferedFileInput(const TString& path) +TUnbufferedFileInput::TUnbufferedFileInput(const TString& path) : File_(path, OpenExisting | RdOnly | Seq) { if (!File_.IsOpen()) { @@ -11,7 +11,7 @@ TUnbufferedFileInput::TUnbufferedFileInput(const TString& path) } } -TUnbufferedFileInput::TUnbufferedFileInput(const TFile& file) +TUnbufferedFileInput::TUnbufferedFileInput(const TFile& file) : File_(file) { if (!File_.IsOpen()) { @@ -19,11 +19,11 @@ TUnbufferedFileInput::TUnbufferedFileInput(const TFile& file) } } -size_t TUnbufferedFileInput::DoRead(void* buf, size_t len) { +size_t TUnbufferedFileInput::DoRead(void* buf, size_t len) { return File_.ReadOrFail(buf, len); } -size_t TUnbufferedFileInput::DoSkip(size_t len) { +size_t TUnbufferedFileInput::DoSkip(size_t len) { if (len < 384) { /* Base implementation calls DoRead, which results in one system call * instead of three as in fair skip implementation. For small sizes @@ -42,7 +42,7 @@ size_t TUnbufferedFileInput::DoSkip(size_t len) { return newPos - oldPos; } -TUnbufferedFileOutput::TUnbufferedFileOutput(const TString& path) +TUnbufferedFileOutput::TUnbufferedFileOutput(const TString& path) : File_(path, CreateAlways | WrOnly | Seq) { if (!File_.IsOpen()) { @@ -50,7 +50,7 @@ TUnbufferedFileOutput::TUnbufferedFileOutput(const TString& path) } } -TUnbufferedFileOutput::TUnbufferedFileOutput(const TFile& file) +TUnbufferedFileOutput::TUnbufferedFileOutput(const TFile& file) : File_(file) { if (!File_.IsOpen()) { @@ -58,13 +58,13 @@ TUnbufferedFileOutput::TUnbufferedFileOutput(const TFile& file) } } -TUnbufferedFileOutput::~TUnbufferedFileOutput() = default; +TUnbufferedFileOutput::~TUnbufferedFileOutput() = default; -void TUnbufferedFileOutput::DoWrite(const void* buf, size_t len) { +void TUnbufferedFileOutput::DoWrite(const void* buf, size_t len) { File_.Write(buf, len); } -void TUnbufferedFileOutput::DoFlush() { +void TUnbufferedFileOutput::DoFlush() { if (File_.IsOpen()) { File_.Flush(); } @@ -87,7 +87,7 @@ TMappedFileInput::TMappedFileInput(const TFile& file) Reset(Impl_->Data(), Impl_->Size()); } -TMappedFileInput::TMappedFileInput(const TString& path) +TMappedFileInput::TMappedFileInput(const TString& path) : TMemoryInput(nullptr, 0) , Impl_(new TImpl(TFile(path, OpenExisting | RdOnly))) { |