NAME

OTC_Stat - Class wrapper around the system stat structure.

SYNOPSIS


#include <OTC/files/stat.hh>

class OTC_Stat
{
  public:
    static os_typespec* get_os_typespec();
    inline operator otclib_stat*();
    OTC_Stat();
    OTC_Stat(OTC_Stat const& theStat);
    OTC_Stat& operator=(OTC_Stat const& theStat);
    inline dev_t dev() const;
    inline u_short mode() const;
    inline u_short permissions() const;
    inline u_short type() const;
    inline off_t size() const;
    inline time_t atime() const;
    inline time_t mtime() const;
    inline time_t ctime() const;
    inline OTC_Boolean isDirectory() const;
    inline OTC_Boolean isRegularFile() const;
    inline OTC_Boolean isCharacterSpecial() const;
    inline OTC_Boolean isFifo() const;
    inline OTC_Boolean isBlockSpecial() const;
    inline OTC_Boolean isUserRead() const;
    inline OTC_Boolean isUserWrite() const;
    inline OTC_Boolean isUserExec() const;
  protected:
    otclib_stat myStat;
};

CLASS TYPE

Concrete

EXAMPLE

ATTRIBUTES

inline dev_t dev() const;
inline u_short mode() const;
inline u_short permissions() const;
inline u_short type() const;
inline off_t size() const;
inline time_t atime() const;
inline time_t mtime() const;
inline time_t ctime() const;
The following simplify questions commonly asked about files.
inline OTC_Boolean isDirectory() const;
inline OTC_Boolean isRegularFile() const;
inline OTC_Boolean isCharacterSpecial() const;
inline OTC_Boolean isFifo() const;
inline OTC_Boolean isBlockSpecial() const;
inline OTC_Boolean isUserRead() const;
inline OTC_Boolean isUserWrite() const;
inline OTC_Boolean isUserExec() const;

DECSCRIPTION

Encapsulates the system stat structure to make deriving information about a file easier. Note that it is still necessary to use the system stat() function to fill out information in the class.

SEE ALSO

stat(2)

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1991 1992 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED