MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / fileSize

Function fileSize

src/OSspecific/POSIX/POSIX.C:572–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570
571
572off_t Foam::fileSize(const fileName& name, const bool followLink)
573{
574 if (POSIX::debug)
575 {
576 Pout<< FUNCTION_NAME << " : name:" << name << endl;
577 if ((POSIX::debug & 2) && !Pstream::master())
578 {
579 error::printStack(Pout);
580 }
581 }
582 fileStat fileStatus(name, followLink);
583 if (fileStatus.isValid())
584 {
585 return fileStatus.status().st_size;
586 }
587 else
588 {
589 return -1;
590 }
591}
592
593
594time_t Foam::lastModified(const fileName& name, const bool followLink)

Callers 3

readSTLBINARYFunction · 0.50
detectBINARYFunction · 0.50

Calls 2

isValidMethod · 0.80
printStackFunction · 0.70

Tested by

no test coverage detected