#include <fileinfo.h>
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) |
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
off_t unsigned long int ino_t ino64_t blkcnt_t blkcnt64_t
FileInfo::FileInfo | ( | ) | [inline] |
Standardconstructor. The only action is to set validflag to false
blkcnt_t FileInfo::blocks | ( | ) | const [inline] |
in 512 KB.
unsigned int FileInfo::optblocksize | ( | ) | const [inline] |
optimal block size for reading of writing.