MCPcopy Create free account
hub / github.com/bbc/audiowaveform / getFileSize

Method getFileSize

src/Mp3AudioFileReader.cpp:373–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371//------------------------------------------------------------------------------
372
373bool Mp3AudioFileReader::getFileSize()
374{
375 struct stat stat_buf;
376
377 int descriptor = file_.getFileDescriptor();
378
379 if (descriptor == -1 || fstat(descriptor, &stat_buf) != 0) {
380 return false;
381 }
382
383 file_size_ = stat_buf.st_size;
384
385 return true;
386}
387
388//------------------------------------------------------------------------------
389

Callers

nothing calls this directly

Calls 1

getFileDescriptorMethod · 0.80

Tested by

no test coverage detected