MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / tryGetFileSize

Function tryGetFileSize

src/IO/WithFileSize.cpp:25–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template <typename T>
25static std::optional<size_t> tryGetFileSize(T & in)
26{
27 if (auto * with_file_size = dynamic_cast<WithFileSize *>(&in))
28 return with_file_size->tryGetFileSize();
29
30 return std::nullopt;
31}
32
33template <typename T>
34static size_t getFileSize(T & in)

Callers 4

getFileSizeMethod · 0.85
getFileSizeFunction · 0.85
getFileSizeMethod · 0.85

Calls 1

tryGetFileSizeMethod · 0.45

Tested by

no test coverage detected