00001 #ifndef CLASSLIB_IO_STATUS_H
00002 # define CLASSLIB_IO_STATUS_H
00003
00004
00005
00006 # include "classlib/utils/Time.h"
00007 # include "classlib/iobase/FileAcl.h"
00008
00009 namespace lat {
00010
00011
00012
00013
00014 class IOStatus;
00015 class logstream;
00016
00017
00018
00019
00020 logstream &operator<< (logstream &log, const IOStatus &s);
00021
00022
00023
00040 class IOStatus
00041 {
00042
00043 public:
00045 enum Type
00046 {
00047 TypeUnknown,
00048 TypeFile,
00049 TypeDirectory,
00050 TypeSocket,
00051 TypeSymlink,
00052 TypeNetworkSpecial,
00053 TypeBlockDev,
00054 TypeCharDev,
00055 TypeFIFO,
00056 TypeVolumeId,
00057 TypeMessageQueue,
00058 TypeSemaphore,
00059 TypeSharedMem,
00060 TypeMemoryObject
00061 };
00062
00063 enum {
00064 FlagUniqueValid = 1
00065 };
00066
00067 Time m_ctime;
00068 Time m_mtime;
00069 Time m_atime;
00070
00071 Type m_type;
00072 FileAcl m_acl;
00073
00074 unsigned m_flags;
00075 unsigned m_unique [3];
00076
00077 unsigned m_links;
00078 IOOffset m_size;
00079
00080
00082 bool fill (IOFD fd);
00083 bool fill (const char *name, bool traverseLinks = true);
00084 void clear (void);
00085 };
00086
00087
00088
00089 }
00090 #endif // CLASSLIB_IO_STATUS_H