MCPcopy Create free account
hub / github.com/apache/singa / GetFileSize

Method GetFileSize

test/gtest/gtest-all.cc:8809–8812  ·  view source on GitHub ↗

Returns the size (in bytes) of a file.

Source from the content-addressed store, hash-verified

8807
8808// Returns the size (in bytes) of a file.
8809size_t CapturedStream::GetFileSize(FILE* file) {
8810 fseek(file, 0, SEEK_END);
8811 return static_cast<size_t>(ftell(file));
8812}
8813
8814// Reads the entire content of a file as a string.
8815std::string CapturedStream::ReadEntireFile(FILE* file) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected