Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

DirectoryEntry Class Reference

#include <Directory.h>

Inheritance diagram for DirectoryEntry:

ContainingListItem< DirectoryEntry > List of all members.

Detailed Description

A DirectoryEntry in the Directory object.

It represents the Path and information of a file or directory.

Author:
Thomas Jacob

Definition at line 317 of file Directory.h.

Public Member Functions

DirectoryEntryClone ()
 Creates a new instance of the directory entry with the same content.

 DirectoryEntry (const char *path)
 Creates a new directory entry.

 DirectoryEntry (class Path *Path)
 Creates a new directory entry.

bool Exists ()
 Returns, if the file or directory, the path points to, exists.

long GetAccessTime ()
 Returns the last access time.

int GetAccessTimeDay ()
 Returns the days of the last access time.

int GetAccessTimeHour ()
 Returns the hours of the last access time.

int GetAccessTimeMinute ()
 Returns the minutes of the last access time.

int GetAccessTimeMonth ()
 Returns the months of the last access time.

int GetAccessTimeSecond ()
 Returns the seconds of the last access time.

int GetAccessTimeYear ()
 Returns the years of the last access time.

long GetCreateTime ()
 Returns the last creation time.

int GetCreateTimeDay ()
 Returns the days of the last creation time.

int GetCreateTimeHour ()
 Returns the hours of the last creation time.

int GetCreateTimeMinute ()
 Returns the minutes of the last creation time.

int GetCreateTimeMonth ()
 Returns the months of the last creation time.

int GetCreateTimeSecond ()
 Returns the seconds of the last creation time.

int GetCreateTimeYear ()
 Returns the years of the last creation time.

long GetFlags ()
 Returns the flags of the file or directory.

long GetModifyTime ()
 Returns the last modification time.

int GetModifyTimeDay ()
 Returns the days or the last modification time.

int GetModifyTimeHour ()
 Returns the hours or the last modification time.

int GetModifyTimeMinute ()
 Returns the minutes or the last modification time.

int GetModifyTimeMonth ()
 Returns the months or the last modification time.

int GetModifyTimeSecond ()
 Returns the seconds or the last modification time.

int GetModifyTimeYear ()
 Returns the years or the last modification time.

DirectoryEntryGetNext () const
 Returns the next ContainingListItem in the list chain.

DirectoryEntryGetNextEntry ()
 Returns the next directory entry.

PathGetPath ()
 Returns the path of the file or directory.

DirectoryEntryGetPrev () const
 Returns the previous ContainingListItem in the list chain.

DirectoryEntryGetPrevEntry ()
 Returns the previous directory entry.

unsigned long GetSize ()
 Returns the file's size.

void Refresh ()
 Refreshed the file or directory's attributes from the disk.

 ~DirectoryEntry ()
 Destroys the directory entry.


Private Member Functions

 DirectoryEntry ()
 Creates a new directory entry.

void Invalidate ()
 Invalidates all directory entry's data.


Static Private Member Functions

void InvalidateTime (struct tm *time)
 Invalidates a time attribute of the entry's data.


Private Attributes

tm AccessTime
 The last access time.

tm CreateTime
 The creation time.

friend Directory
bool ExistsFlag
 If the file or directory exists.

long Flags
 The file or directory flags.

tm ModifyTime
 The last modification time.

PathPath
 The complete path to the file or directory.

unsigned long Size
 The size of the file.


Constructor & Destructor Documentation

DirectoryEntry  )  [private]
 

Creates a new directory entry.

DirectoryEntry class Path Path  ) 
 

Creates a new directory entry.

Parameters:
Path A path to the file or directory. This path is copied, so the memory is not used anymore after creation.

DirectoryEntry const char *  path  ) 
 

Creates a new directory entry.

Parameters:
path A path to the file or directory. This path is copied, so the memory is not used anymore after creation.

~DirectoryEntry  ) 
 

Destroys the directory entry.


Member Function Documentation

DirectoryEntry* Clone  ) 
 

Creates a new instance of the directory entry with the same content.

Returns:
A clone of the object.
Exceptions:
EOutOfMemory The clone could not be allocated.

bool Exists  )  [inline]
 

Returns, if the file or directory, the path points to, exists.

Returns:
If the file or directory exists.

long GetAccessTime  ) 
 

Returns the last access time.

Returns:
The last access time.

int GetAccessTimeDay  )  [inline]
 

Returns the days of the last access time.

Returns:
The days of the last access time.

int GetAccessTimeHour  )  [inline]
 

Returns the hours of the last access time.

Returns:
The hours of the last access time.

int GetAccessTimeMinute  )  [inline]
 

Returns the minutes of the last access time.

Returns:
The minutes of the last access time.

int GetAccessTimeMonth  )  [inline]
 

Returns the months of the last access time.

Returns:
The months of the last access time.

int GetAccessTimeSecond  )  [inline]
 

Returns the seconds of the last access time.

Returns:
The seconds of the last access time.

int GetAccessTimeYear  )  [inline]
 

Returns the years of the last access time.

Returns:
The years of the last access time.

long GetCreateTime  ) 
 

Returns the last creation time.

Returns:
The last creation time.

int GetCreateTimeDay  )  [inline]
 

Returns the days of the last creation time.

Returns:
The days of the last creation time.

int GetCreateTimeHour  )  [inline]
 

Returns the hours of the last creation time.

Returns:
The hours of the last creation time.

int GetCreateTimeMinute  )  [inline]
 

Returns the minutes of the last creation time.

Returns:
The minutes of the last creation time.

int GetCreateTimeMonth  )  [inline]
 

Returns the months of the last creation time.

Returns:
The months of the last creation time.

int GetCreateTimeSecond  )  [inline]
 

Returns the seconds of the last creation time.

Returns:
The seconds of the last creation time.

int GetCreateTimeYear  )  [inline]
 

Returns the years of the last creation time.

Returns:
The years of the last creation time.

long GetFlags  )  [inline]
 

Returns the flags of the file or directory.

Returns:
The flags of the file or directory.

long GetModifyTime  ) 
 

Returns the last modification time.

Returns:
The last modification time.

int GetModifyTimeDay  )  [inline]
 

Returns the days or the last modification time.

Returns:
The days or the last modification time.

int GetModifyTimeHour  )  [inline]
 

Returns the hours or the last modification time.

Returns:
The hours or the last modification time.

int GetModifyTimeMinute  )  [inline]
 

Returns the minutes or the last modification time.

Returns:
The minutes or the last modification time.

int GetModifyTimeMonth  )  [inline]
 

Returns the months or the last modification time.

Returns:
The months or the last modification time.

int GetModifyTimeSecond  )  [inline]
 

Returns the seconds or the last modification time.

Returns:
The seconds or the last modification time.

int GetModifyTimeYear  )  [inline]
 

Returns the years or the last modification time.

Returns:
The years or the last modification time.

DirectoryEntry * GetNext  )  const [inline, inherited]
 

Returns the next ContainingListItem in the list chain.

Returns:
The next ContainingListItem.

class DirectoryEntry* GetNextEntry  )  [inline]
 

Returns the next directory entry.

Returns:
The next directory entry.

class Path* GetPath  )  [inline]
 

Returns the path of the file or directory.

Returns:
The path of the file or directory.

DirectoryEntry * GetPrev  )  const [inline, inherited]
 

Returns the previous ContainingListItem in the list chain.

Returns:
The previous ContainingListItem.

class DirectoryEntry* GetPrevEntry  )  [inline]
 

Returns the previous directory entry.

Returns:
The previous directory entry.

unsigned long GetSize  )  [inline]
 

Returns the file's size.

Returns:
The file's size.

void Invalidate  )  [private]
 

Invalidates all directory entry's data.

This is done when the entry is refreshed, and the file or directory cannot be found.

void InvalidateTime struct tm *  time  )  [static, private]
 

Invalidates a time attribute of the entry's data.

This is done when the entry is refreshed, and the file or directory cannot be found.

Parameters:
time A pointer to the attribute to be invalidated.

void Refresh  ) 
 

Refreshed the file or directory's attributes from the disk.


Member Data Documentation

struct tm AccessTime [private]
 

The last access time.

Definition at line 326 of file Directory.h.

struct tm CreateTime [private]
 

The creation time.

Definition at line 331 of file Directory.h.

friend Directory [private]
 

Definition at line 319 of file Directory.h.

bool ExistsFlag [private]
 

If the file or directory exists.

Definition at line 336 of file Directory.h.

long Flags [private]
 

The file or directory flags.

Definition at line 341 of file Directory.h.

struct tm ModifyTime [private]
 

The last modification time.

Definition at line 353 of file Directory.h.

class Path* Path [private]
 

The complete path to the file or directory.

Definition at line 358 of file Directory.h.

unsigned long Size [private]
 

The size of the file.

Definition at line 363 of file Directory.h.


The documentation for this class was generated from the following file:
Generated on Tue Oct 3 00:23:39 2006 for ToolBox by doxygen 1.3.6