CMS 3D CMS Logo

lat::IOStatus Class Reference

Collection of file status information. More...

#include <Iguana/Utilities/classlib/iobase/IOStatus.h>

List of all members.

Public Types

enum  { FlagUniqueValid = 1 }
enum  Type {
  TypeUnknown, TypeFile, TypeDirectory, TypeSocket,
  TypeSymlink, TypeNetworkSpecial, TypeBlockDev, TypeCharDev,
  TypeFIFO, TypeVolumeId, TypeMessageQueue, TypeSemaphore,
  TypeSharedMem, TypeMemoryObject
}
 File types. More...

Public Member Functions

void clear (void)
bool fill (const char *name, bool traverseLinks=true)
bool fill (IOFD fd)

Public Attributes

FileAcl m_acl
Time m_atime
Time m_ctime
unsigned m_flags
unsigned m_links
Time m_mtime
IOOffset m_size
Type m_type
unsigned m_unique [3]


Detailed Description

Collection of file status information.

Using this information has limited value because of two reasons: not all systems provide meaningful values for all the fields, and many of the fields are not accurate.

Deductions from the file's owner and the access mode bits should be avoided: they do not work on ACL-based filesystems neither on UNIX nor on Windows. Instead use the more targeted queries such as Filename::isWritable() or File::times(). These usually return correct results.

Getting this information is not efficient on all systems. This is another reason to avoid this class unless the application knows what it is doing (e.g. choosing to be unportable for performance reasons).

Definition at line 40 of file IOStatus.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
FlagUniqueValid 

Definition at line 63 of file IOStatus.h.

00063          {
00064         FlagUniqueValid = 1             //< #m_unique is valid.
00065     };

enum lat::IOStatus::Type

File types.

Enumerator:
TypeUnknown 
TypeFile 
TypeDirectory 
TypeSocket 
TypeSymlink 
TypeNetworkSpecial 
TypeBlockDev 
TypeCharDev 
TypeFIFO 
TypeVolumeId 
TypeMessageQueue 
TypeSemaphore 
TypeSharedMem 
TypeMemoryObject 

Definition at line 45 of file IOStatus.h.

00046     {
00047         TypeUnknown,            //< Unknown or unsupported.
00048         TypeFile,               //< Regular file.
00049         TypeDirectory,          //< Directory.
00050         TypeSocket,             //< Socket.
00051         TypeSymlink,            //< Symbolic link.
00052         TypeNetworkSpecial,     //< Network special file.
00053         TypeBlockDev,           //< Block device.
00054         TypeCharDev,            //< Character device.
00055         TypeFIFO,               //< FIFO (named or anonymous pipe).
00056         TypeVolumeId,           //< Volume label.
00057         TypeMessageQueue,       //< Message queue as a file type.
00058         TypeSemaphore,          //< Semaphore as a file type.
00059         TypeSharedMem,          //< Shared memory as a file type.
00060         TypeMemoryObject        //< Typed memory object as a file type.
00061     };


Member Function Documentation

void lat::IOStatus::clear ( void   ) 

bool lat::IOStatus::fill ( const char *  name,
bool  traverseLinks = true 
)

bool lat::IOStatus::fill ( IOFD  fd  ) 


Member Data Documentation

FileAcl lat::IOStatus::m_acl

Definition at line 72 of file IOStatus.h.

Time lat::IOStatus::m_atime

Definition at line 69 of file IOStatus.h.

Time lat::IOStatus::m_ctime

Definition at line 67 of file IOStatus.h.

unsigned lat::IOStatus::m_flags

Definition at line 74 of file IOStatus.h.

unsigned lat::IOStatus::m_links

Definition at line 77 of file IOStatus.h.

Time lat::IOStatus::m_mtime

Definition at line 68 of file IOStatus.h.

IOOffset lat::IOStatus::m_size

Definition at line 78 of file IOStatus.h.

Type lat::IOStatus::m_type

Definition at line 71 of file IOStatus.h.

unsigned lat::IOStatus::m_unique[3]

Definition at line 75 of file IOStatus.h.


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:48:26 2009 for CMSSW by  doxygen 1.5.4