mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-20 05:05:38 +00:00
22 lines
338 B
C++
22 lines
338 B
C++
|
#pragma once
|
||
|
#include <base/types.h>
|
||
|
#include <optional>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class ReadBuffer;
|
||
|
|
||
|
class WithFileSize
|
||
|
{
|
||
|
public:
|
||
|
virtual std::optional<size_t> getFileSize() = 0;
|
||
|
virtual ~WithFileSize() = default;
|
||
|
};
|
||
|
|
||
|
bool isBufferWithFileSize(const ReadBuffer & in);
|
||
|
|
||
|
std::optional<size_t> getFileSizeFromReadBuffer(ReadBuffer & in);
|
||
|
|
||
|
}
|