Wrapper for stat() system call. More...
Public Member Functions | |
fileStat () | |
Empty constructor. More... | |
fileStat (const fileName &fName, const bool followLink=true, const unsigned int maxTime=0) | |
Construct from components. More... | |
fileStat (Istream &) | |
Construct from Istream. More... | |
const struct stat & | status () const |
Raw status. More... | |
bool | isValid () const |
Did constructor fail. More... | |
bool | sameDevice (const fileStat &stat2) const |
Compare two fileStats for same device. More... | |
bool | sameINode (const fileStat &stat2) const |
Compare two fileStats for same Inode. More... | |
bool | sameINode (const label iNode) const |
Compare state against inode. More... | |
Friends | |
Istream & | operator>> (Istream &, fileStat &) |
Ostream & | operator<< (Ostream &, const fileStat &) |
Wrapper for stat() system call.
Definition at line 65 of file fileStat.H.
fileStat | ( | ) |
Empty constructor.
Definition at line 36 of file fileStat.C.
Construct from components.
followLink : in case of link get status of pointed-to file maxTime : time out
Definition at line 43 of file fileStat.C.
References timedOut.
Construct from Istream.
Definition at line 85 of file fileStat.C.
|
inline |
Raw status.
Definition at line 100 of file fileStat.H.
Referenced by Foam::fileSize(), Foam::highResLastModified(), Foam::lastModified(), Foam::mode(), fileStat::sameDevice(), and fileStat::sameINode().
|
inline |
Did constructor fail.
Definition at line 106 of file fileStat.H.
References fileStat::operator<<, fileStat::operator>>, fileStat::sameDevice(), and fileStat::sameINode().
Referenced by Foam::fileSize(), Foam::highResLastModified(), Foam::lastModified(), and Foam::mode().
bool sameDevice | ( | const fileStat & | stat2 | ) | const |
Compare two fileStats for same device.
Definition at line 93 of file fileStat.C.
References fileStat::status().
Referenced by fileStat::isValid().
bool sameINode | ( | const fileStat & | stat2 | ) | const |
Compare two fileStats for same Inode.
Definition at line 104 of file fileStat.C.
References fileStat::status().
Referenced by fileStat::isValid().
bool sameINode | ( | const label | iNode | ) | const |
Compare state against inode.
Definition at line 110 of file fileStat.C.
Referenced by fileStat::isValid().
Referenced by fileStat::isValid().