44 volatile bool locIsValid =
false;
46 timer myTimer(maxTime);
50 if (::stat(fName.c_str(), &status_) != 0)
61 isValid_ = locIsValid;
78 major(status_.st_dev) == major(stat2.
status().st_dev)
79 && minor(status_.st_dev) == minor(stat2.
status().st_dev)
86 return isValid_ && (status_.st_ino == stat2.
status().st_ino);
92 return isValid_ && (status_.st_ino == ino_t(iNode));
102 fStat.isValid_ = stat[0];
104 dev_t st_dev = makedev(stat[1], stat[2]);
105 fStat.status_.st_dev = st_dev;
107 fStat.status_.st_ino = stat[3];
108 fStat.status_.st_mode = stat[4];
109 fStat.status_.st_uid = stat[5];
110 fStat.status_.st_gid = stat[6];
112 dev_t st_rdev = makedev(stat[7], stat[8]);
113 fStat.status_.st_rdev = st_rdev;
115 fStat.status_.st_size = stat[9];
116 fStat.status_.st_atime = stat[10];
117 fStat.status_.st_mtime = stat[11];
118 fStat.status_.st_ctime = stat[12];
121 is.
check(
"Istream& operator>>(Istream&, fileStat&)");
131 stat[0] =
label(fStat.isValid_);
132 stat[1] =
label(major(fStat.status_.st_dev));
133 stat[2] =
label(minor(fStat.status_.st_dev));
134 stat[3] =
label(fStat.status_.st_ino);
135 stat[4] =
label(fStat.status_.st_mode);
136 stat[5] =
label(fStat.status_.st_uid);
137 stat[6] =
label(fStat.status_.st_gid);
138 stat[7] =
label(major(fStat.status_.st_rdev));
139 stat[8] =
label(minor(fStat.status_.st_rdev));
140 stat[9] =
label(fStat.status_.st_size);
141 stat[10] =
label(fStat.status_.st_atime);
142 stat[11] =
label(fStat.status_.st_mtime);
143 stat[12] =
label(fStat.status_.st_ctime);
bool sameINode(const fileStat &stat2) const
Compare two fileStats for same Inode.
bool sameDevice(const fileStat &stat2) const
Compare two fileStats for same device.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
A 1D vector of objects of type <T> with a fixed size <Size>.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Implements a timeout mechanism via sigalarm.
fileStat()
Empty constructor.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Wrapper for stat() system call.
#define timedOut(x)
Check it a timeout has occured.
Ostream & operator<<(Ostream &, const ensightPart &)
const struct stat & status() const
Raw status.