32 #include <sys/sysmacros.h> 45 const bool followLink,
46 const unsigned int maxTime
50 volatile bool locIsValid =
false;
52 timer myTimer(maxTime);
58 if (::stat(fName.c_str(), &status_) != 0)
69 if (::lstat(fName.c_str(), &status_) != 0)
81 isValid_ = locIsValid;
98 major(status_.st_dev) == major(stat2.
status().st_dev)
99 && minor(status_.st_dev) == minor(stat2.
status().st_dev)
106 return isValid_ && (status_.st_ino == stat2.
status().st_ino);
112 return isValid_ && (status_.st_ino == ino_t(iNode));
122 fStat.isValid_ = stat[0];
124 dev_t st_dev = makedev(stat[1], stat[2]);
125 fStat.status_.st_dev = st_dev;
127 fStat.status_.st_ino = stat[3];
128 fStat.status_.st_mode = stat[4];
129 fStat.status_.st_uid = stat[5];
130 fStat.status_.st_gid = stat[6];
132 dev_t st_rdev = makedev(stat[7], stat[8]);
133 fStat.status_.st_rdev = st_rdev;
135 fStat.status_.st_size = stat[9];
136 fStat.status_.st_atime = stat[10];
137 fStat.status_.st_mtime = stat[11];
138 fStat.status_.st_ctime = stat[12];
141 is.
check(
"Istream& operator>>(Istream&, fileStat&)");
151 stat[0] =
label(fStat.isValid_);
152 stat[1] =
label(major(fStat.status_.st_dev));
153 stat[2] =
label(minor(fStat.status_.st_dev));
154 stat[3] =
label(fStat.status_.st_ino);
155 stat[4] =
label(fStat.status_.st_mode);
156 stat[5] =
label(fStat.status_.st_uid);
157 stat[6] =
label(fStat.status_.st_gid);
158 stat[7] =
label(major(fStat.status_.st_rdev));
159 stat[8] =
label(minor(fStat.status_.st_rdev));
160 stat[9] =
label(fStat.status_.st_size);
161 stat[10] =
label(fStat.status_.st_atime);
162 stat[11] =
label(fStat.status_.st_mtime);
163 stat[12] =
label(fStat.status_.st_ctime);
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>.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
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.
bool sameINode(const fileStat &stat2) const
Compare two fileStats for same Inode.
const struct stat & status() const
Raw status.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
bool sameDevice(const fileStat &stat2) const
Compare two fileStats for same device.
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 &)