Wrapper for stat() system call. More...
Public Member Functions | |
| fileStat () | |
| Empty constructor. More... | |
| fileStat (const fileName &fName, const bool checkVariants=true, 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... | |
Static Public Attributes | |
| static const label | nVariants_ = 2 |
| Number of file variants. More... | |
| static const char * | variantExts_ [] = {"gz", "orig"} |
| Extensions of the file variants. 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 43 of file fileStat.C.
| fileStat | ( | const fileName & | fName, |
| const bool | checkVariants = true, |
||
| const bool | followLink = true, |
||
| const unsigned int | maxTime = 0 |
||
| ) |
Construct from components.
followLink : in case of link get status of pointed-to file maxTime : time out
Definition at line 49 of file fileStat.C.
References timedOut.
Construct from Istream.
Definition at line 89 of file fileStat.C.
|
inline |
Raw status.
Definition at line 110 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 116 of file fileStat.H.
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 97 of file fileStat.C.
References fileStat::status().

| bool sameINode | ( | const fileStat & | stat2 | ) | const |
Compare two fileStats for same Inode.
Definition at line 108 of file fileStat.C.
References fileStat::status().

| bool sameINode | ( | const label | iNode | ) | const |
Compare state against inode.
Definition at line 114 of file fileStat.C.
|
static |
Number of file variants.
Definition at line 79 of file fileStat.H.
|
static |
Extensions of the file variants.
Definition at line 82 of file fileStat.H.