The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cFolder Class Reference

#include <cFolder.h>

Collaboration diagram for cFolder:

List of all members.

Public Member Functions

 cFolder (const char *szFolderName)
 cFolder (const string &szFolderName)
bool update ()
bool good () const
struct stat getInfo (unsigned int uiEntryNumber) const
struct stat getInfo (const string &szEntryName) const
unsigned long getSize (const string &szEntryName) const
unsigned int getUserId (const string &szEntryName) const
unsigned int getGroupId (const string &szEntryName) const
time_t getLastAccessTime (const string &szEntryName) const
time_t getLastChangeTime (const string &szEntryName) const
time_t getLastStatusChangeTime (const string &szEntryName) const
list< string > getAllEntries () const
list< string > getSubFolders () const
list< string > getFiles () const

Protected Attributes

string szFolderName
bool bGood
list< pair< string, struct stat > > liEntryInfo
list< string > liSubFolders
list< string > liFiles

Detailed Description

Definition at line 56 of file cFolder.h.


Constructor & Destructor Documentation

cFolder::cFolder ( const char *  szFolderName)

constructor

Parameters:
szFolderNamethe path of the folder this object should represent
cFolder::cFolder ( const string &  szFolderName)

constructor

Parameters:
szFolderNamethe path of the folder this object should represent

Member Function Documentation

list<string> cFolder::getAllEntries ( ) const
Returns:
a list with the names of all entries in the folder
list<string> cFolder::getFiles ( ) const
Returns:
a list with the names of all (regular) files in the folder
unsigned int cFolder::getGroupId ( const string &  szEntryName) const

This method returns the group id of the folderentry with the given name szEntryName.

Parameters:
szEntryNamethe name of the entry, for which the group id is to be returned
Returns:
the group id of the entry with given name szEntryName, or 0 if the entry didn't exists or has no size
struct stat cFolder::getInfo ( unsigned int  uiEntryNumber) const
read

Returns the entryinformation for the entry with the given number.

Parameters:
uiEntryNumberthe number of the entry, for which the information is to be returned
Returns:
the information to the uiEntryNumber'th entry in the folder
struct stat cFolder::getInfo ( const string &  szEntryName) const
read

Returns the entryinformation for the entry with the given name.

Parameters:
szEntryNamethe name of the entry, for which the information is to be returned
Returns:
the information to the entry with the given name szEntryName
time_t cFolder::getLastAccessTime ( const string &  szEntryName) const

This method returns the time the folderentry with the given name szEntryName was last accessed.

Parameters:
szEntryNamethe name of the entry, for which the last access time is to be returned
Returns:
the time of the last access of the entry with given name szEntryName, or 0 if the entry didn't exists
time_t cFolder::getLastChangeTime ( const string &  szEntryName) const

This method returns the time the folderentry with the given name szEntryName was last changed.

Parameters:
szEntryNamethe name of the entry, for which the last changed time is to be returned
Returns:
the time of the last changed of the entry with given name szEntryName, or 0 if the entry didn't exists
time_t cFolder::getLastStatusChangeTime ( const string &  szEntryName) const

This method returns the time status of the folderentry with the given name szEntryName was last changed.

Parameters:
szEntryNamethe name of the entry, for which the last status changed time is to be returned
Returns:
the time of the last status changed of the entry with given name szEntryName, or 0 if the entry didn't exists
unsigned long cFolder::getSize ( const string &  szEntryName) const

This method returns the size (in byts) of the folderentry with the given name szEntryName.

Parameters:
szEntryNamethe name of the entry, for which the size is to be returned
Returns:
the size in byts of the entry with given name szEntryName, or 0 if the entry didn't exists or has no size
list<string> cFolder::getSubFolders ( ) const
Returns:
a list with the names of all subfolders in the folder
unsigned int cFolder::getUserId ( const string &  szEntryName) const

This method returns the user id of the folderentry with the given name szEntryName.

Parameters:
szEntryNamethe name of the entry, for which the user id is to be returned
Returns:
the user id of the entry with given name szEntryName, or 0 if the entry didn't exists or has no size
bool cFolder::good ( ) const
Returns:
true if the folder, this class represents, is accessible, else false
bool cFolder::update ( )

Updates the data of the folder. This means the folder information is reread.


Member Data Documentation

bool cFolder::bGood
protected

If the folder, this class represents, is accessible.

Definition at line 67 of file cFolder.h.

list< pair<string, struct stat> > cFolder::liEntryInfo
protected

The list of the entries of the folder, with ther information.

Definition at line 72 of file cFolder.h.

list<string> cFolder::liFiles
protected

The list of (regular) files in the folder.

Definition at line 82 of file cFolder.h.

list<string> cFolder::liSubFolders
protected

The list of subfolders in the folder.

Definition at line 77 of file cFolder.h.

string cFolder::szFolderName
protected

The path of the folder this class represents.

Definition at line 62 of file cFolder.h.


The documentation for this class was generated from the following file: