FileInfo Class Reference

Represents Fileattributes. More...

#include <fileinfo.h>

List of all members.

Public Member Functions

 FileInfo ()
 FileInfo (const string &filename)
off_t size () const
time_t atime () const
time_t mtime () const
time_t ctime () const
mode_t mode () const
ino_t inode () const
dev_t device () const
nlink_t nlinks () const
uid_t uid () const
gid_t gid () const
blkcnt_t blocks () const
unsigned int optblocksize () const
bool isLink () const
bool isDir () const
bool isFile () const
bool isValid ()
bool read (const string &fname, bool followlink=false)


Detailed Description

Represents Fileattributes.

With this, you can get attributes like size, different dates/times and checks whether the file is a regular file, pipe or folder.
This class uses the gnulibc standard types. On most architectures (i386) the sizes of the used types treated as follows:

        off_t           uint
        mode_t          uint
        ino_t           unsigned long int
        ino64_t         unsigned long long int
        dev_t           int
        nlink_t         unsigned short int
        blkcnt_t        unsigned long int
        blkcnt64_t      unsigned long long int 
if compiled with _FILE_OFFSET_BITS == 64:
        off_t           unsigned long int
        ino_t           ino64_t
        blkcnt_t        blkcnt64_t 
Todo:
implement mime - size and date does not work

Example:
Author:
Fred Klaus


Constructor & Destructor Documentation

FileInfo::FileInfo (  )  [inline]

Standardconstructor. The only action is to set validflag to false


Member Function Documentation

blkcnt_t FileInfo::blocks (  )  const [inline]

in 512 KB.

unsigned int FileInfo::optblocksize (  )  const [inline]

optimal block size for reading of writing.


The documentation for this class was generated from the following files:
Generated on Fri Mar 16 21:30:29 2007 for roland.kdevelop by  doxygen 1.5.0