diff options
author | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-30 13:26:22 +0300 |
---|---|---|
committer | vitalyisaev <vitalyisaev@ydb.tech> | 2023-11-30 15:44:45 +0300 |
commit | 0a98fece5a9b54f16afeb3a94b3eb3105e9c3962 (patch) | |
tree | 291d72dbd7e9865399f668c84d11ed86fb190bbf /library/cpp/streams/growing_file_input/growing_file_input.h | |
parent | cb2c8d75065e5b3c47094067cb4aa407d4813298 (diff) | |
download | ydb-0a98fece5a9b54f16afeb3a94b3eb3105e9c3962.tar.gz |
YQ Connector:Use docker-compose in integrational tests
Diffstat (limited to 'library/cpp/streams/growing_file_input/growing_file_input.h')
-rw-r--r-- | library/cpp/streams/growing_file_input/growing_file_input.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/library/cpp/streams/growing_file_input/growing_file_input.h b/library/cpp/streams/growing_file_input/growing_file_input.h new file mode 100644 index 0000000000..9054a5f3da --- /dev/null +++ b/library/cpp/streams/growing_file_input/growing_file_input.h @@ -0,0 +1,23 @@ +#pragma once + +#include <util/stream/input.h> +#include <util/system/file.h> + +/** + * Growing file input stream. + * + * File descriptor offsets to the end of the file, when the object is created. + * + * Read function waites for reading at least one byte. + */ +class TGrowingFileInput: public IInputStream { +public: + TGrowingFileInput(const TFile& file); + TGrowingFileInput(const TString& path); + +private: + size_t DoRead(void* buf, size_t len) override; + +private: + TFile File_; +}; |