OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

fileStat Class Reference

Wrapper for stat() system call. More...

List of all members.


Public Member Functions

 fileStat ()
 Empty constructor.
 fileStat (const fileName &fName, const unsigned int maxTime=0)
 Construct from components.
 fileStat (Istream &)
 Construct from Istream.
struct stat & status () const
 Raw status.
bool isValid () const
 Did constructor fail.
bool sameDevice (const fileStat &stat2) const
 compare two fileStats for same device
bool sameINode (const fileStat &stat2) const
 compare two fileStats for same Inode
bool sameINode (const label iNode) const
 compare state against inode

Friends

Istream & operator>> (Istream &, fileStat &)
Ostream & operator<< (Ostream &, const fileStat &)

Detailed Description

Wrapper for stat() system call.

Warning:
on Linux (an maybe on others) a stat() of an nfs mounted (remote) file does never timeout and cannot be interrupted! So e.g. Foam::ping first and hope nfs is running.
Source files

Definition at line 61 of file fileStat.H.


Constructor & Destructor Documentation

fileStat (  ) 

Empty constructor.

Definition at line 28 of file fileStat.C.

fileStat ( const fileName &  fName,
const unsigned int  maxTime = 0 
)

Construct from components.

Definition at line 34 of file fileStat.C.

fileStat ( Istream &  is  ) 

Construct from Istream.

Definition at line 58 of file fileStat.C.


Member Function Documentation

struct stat& status (  )  const [inline, read]

Raw status.

Definition at line 89 of file fileStat.H.

bool isValid (  )  const [inline]

Did constructor fail.

Definition at line 95 of file fileStat.H.

bool sameDevice ( const fileStat &  stat2  )  const

compare two fileStats for same device

Definition at line 66 of file fileStat.C.

bool sameINode ( const fileStat &  stat2  )  const

compare two fileStats for same Inode

Definition at line 77 of file fileStat.C.

bool sameINode ( const label  iNode  )  const

compare state against inode

Definition at line 83 of file fileStat.C.


Friends And Related Function Documentation

Istream& operator>> ( Istream &  ,
fileStat &   
) [friend]

Ostream& operator<< ( Ostream &  ,
const fileStat &   
) [friend]


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd