#include <OUX/files/stat.hh> class OUX_Stat : public OTC_Stat {
public:
static os_typespec* get_os_typespec();
inline OUX_Stat();
inline OUX_Stat(OUX_Stat const& theStat);
inline ino_t ino() const;
inline short nlink() const;
inline uid_t uid() const;
inline gid_t gid() const;
inline dev_t rdev() const;
inline long blksize() const;
inline long blocks() const;
inline OTC_Boolean isSymbolicLink() const;
inline OTC_Boolean isSocket() const;
inline OTC_Boolean isSetUid() const;
inline OTC_Boolean isSetGid() const;
inline OTC_Boolean isSaveTxt() const;
inline OTC_Boolean isGroupRead() const;
inline OTC_Boolean isGroupWrite() const;
inline OTC_Boolean isGroupExec() const;
inline OTC_Boolean isOtherRead() const;
inline OTC_Boolean isOtherWrite() const;
inline OTC_Boolean isOtherExec() const;
};
OUX_Stat info;
if (stat("/tmp",info) == 0)
{
if (info.isDirectory())
cout << "Is a directory" << endl;
}
inline ino_t ino() const;
inline short nlink() const;
inline uid_t uid() const;
inline gid_t gid() const;
inline dev_t rdev() const;
inline long blksize() const;
inline long blocks() const;
inline OTC_Boolean isSymbolicLink() const;
OTCLIB_TRUE
if file is a
symbolic link.
inline OTC_Boolean isSocket() const;
OTCLIB_TRUE
if file is a socket.
inline OTC_Boolean isSetUid() const;
OTCLIB_TRUE
if file is setuid.
inline OTC_Boolean isSetGid() const;
OTCLIB_TRUE
if file is setgid.
inline OTC_Boolean isSaveTxt() const;
OTCLIB_TRUE
if file is has its
stickybit set.
inline OTC_Boolean isGroupRead() const;
OTCLIB_FALSE
if not readable by
the users in the group of the file.
inline OTC_Boolean isGroupWrite() const;
OTCLIB_FALSE
if not writable by
the users in the group of the file.
inline OTC_Boolean isGroupExec() const;
OTCLIB_FALSE
if not executable
by the users in the group of the file.
inline OTC_Boolean isOtherRead() const;
OTCLIB_FALSE
if not readable by
any users.
inline OTC_Boolean isOtherWrite() const;
OTCLIB_FALSE
if not writable by
any users.
inline OTC_Boolean isOtherExec() const;
OTCLIB_FALSE
if not executable by
any users.
stat()
function to fill out information in the class.
This derived version of OTC_Stat
adds extra functionality
particular to UNIX.
stat(2)