ClickHouse/src/IO/WithFileSize.h

22 lines
338 B
C++
Raw Normal View History

2022-04-26 12:57:02 +00:00
#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);
}