Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

CTDirEntry Class Reference

#include <ctfilesystem2.h>

List of all members.

Public Types

enum  Attributes {
  Attr_USED = 0x0001, Attr_READ = 0x0002, Attr_WRITE = 0x0004, Attr_DIR = 0x0008,
  Attr_HIDDEN = 0x0010
}

Public Member Functions

Constructors and destructors
The only constructor you will be confronted with is that without arguments, since you will rarely need create a valid direntry yourself.

 CTDirEntry ()
 CTDirEntry (int parent, const string &name, unsigned int attribs=Attr_USED, unsigned int size=0, int firstblock=-1)
 CTDirEntry (const string &s)
 CTDirEntry (int parent, int indexInParent=-1)
 ~CTDirEntry ()
Retrieving information about this file or directory
const string & name () const
unsigned int attributes () const
int size () const
Retrieving internal information
The members returned here are internal and not part of the API, so you should not expect them to be unchanged in future versions !

bool changed () const
int firstBlock () const
int parent () const
int indexInParent () const
Internal setters
void setAttributes (unsigned int i)
void setSize (unsigned int i)
void setName (const string &s)
void setFirstBlock (int i)
void setParent (int i)
void setIndexInParent (int i)
void setChanged (bool b)
Internal Conversion operations
string toString ()
string dump ()


Detailed Description

This class represents an entry of a folder and therefore describes a file or directory. The only way to
get an object of this class which really describes a file is by calling CTFile::statFile
Author:
Martin Preuss<martin@libchipcard.de>


Member Enumeration Documentation

enum CTDirEntry::Attributes
 

Attributes of a file or folder.

Enumeration values:
Attr_USED  Entry is in use
Attr_READ  Reading the file/folder is allowed
Attr_WRITE  Writing to the file/folder is allowed.
Attr_DIR  Entry is a directory
Attr_HIDDEN  Entry is hidden (this attribure is currently unused)


Constructor & Destructor Documentation

CTDirEntry::CTDirEntry  ) 
 

This is the only constructor interesting for application developers.

CTDirEntry::CTDirEntry int  parent,
const string &  name,
unsigned int  attribs = Attr_USED,
unsigned int  size = 0,
int  firstblock = -1
 

CTDirEntry::CTDirEntry const string &  s  ) 
 

CTDirEntry::CTDirEntry int  parent,
int  indexInParent = -1
 

CTDirEntry::~CTDirEntry  ) 
 


Member Function Documentation

unsigned int CTDirEntry::attributes  )  const [inline]
 

Returns the attributes of this file or directory (Attributes)

Author:
Martin Preuss<martin@libchipcard.de>

bool CTDirEntry::changed  )  const [inline]
 

Was this entry changed since last read/write ?

Author:
Martin Preuss<martin@libchipcard.de>

string CTDirEntry::dump  ) 
 

int CTDirEntry::firstBlock  )  const [inline]
 

Returns the number of the first block of this file.

Author:
Martin Preuss<martin@libchipcard.de>

int CTDirEntry::indexInParent  )  const [inline]
 

This is the position within the parent folder where this entry is contained. If -1 then this entry is a new one and has not been stored yet.

Author:
Martin Preuss<martin@libchipcard.de>

const string& CTDirEntry::name  )  const [inline]
 

Returns the name of this file or directory.

Author:
Martin Preuss<martin@libchipcard.de>

int CTDirEntry::parent  )  const [inline]
 

This is the first block of the parent. This can be used to scan the parent for entries. The parent is the folder where this entry is contained.

Author:
Martin Preuss<martin@libchipcard.de>

void CTDirEntry::setAttributes unsigned int  i  )  [inline]
 

void CTDirEntry::setChanged bool  b  )  [inline]
 

void CTDirEntry::setFirstBlock int  i  )  [inline]
 

void CTDirEntry::setIndexInParent int  i  )  [inline]
 

void CTDirEntry::setName const string &  s  )  [inline]
 

void CTDirEntry::setParent int  i  )  [inline]
 

void CTDirEntry::setSize unsigned int  i  )  [inline]
 

int CTDirEntry::size  )  const [inline]
 

Size of this file. If this entry describes a directory then it's is zero.

Author:
Martin Preuss<martin@libchipcard.de>

string CTDirEntry::toString  ) 
 


The documentation for this class was generated from the following file:
Generated on Sat Feb 11 15:20:28 2006 for libchipcard by  doxygen 1.4.2