ionflux.org | Impressum

Ionflux::Tools::File Class Reference
[General tools]

File. More...

#include <File.hpp>

Inheritance diagram for Ionflux::Tools::File:

Inheritance graph
[legend]
Collaboration diagram for Ionflux::Tools::File:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 File ()
 Constructor.
 File (const std::string &initFullName)
 Constructor.
virtual ~File ()
 Destructor.
virtual void refresh ()
 Refresh file.
virtual bool isValid ()
 Check validity.
virtual bool isDir ()
 Get directory status.
virtual unsigned int getSize ()
 Get file size.
virtual time_t getAccessTime ()
 Get access time.
virtual time_t getModTime ()
 Get modification time.
virtual time_t getChangeTime ()
 Get change time.
virtual void setName (const std::string &newName)
 Set file name.
virtual void setPath (const std::string &newPath)
 Set file path.
virtual void setFullName (const std::string &newFullName)
 Set full name of file (including path).
virtual std::string getName () const
 Get file name.
virtual std::string getPath () const
 Get file path.
virtual std::string getFullName () const
 Get full name of file (including path).

Protected Member Functions

virtual bool updateStatInfo ()
 Update stat information.

Protected Attributes

stat statInfo
 Information returned by stat.
unsigned int size
 File size.
time_t accessTime
 Time of last access.
time_t modTime
 Time of last modification.
time_t changeTime
 Time of last status change.
bool validity
 Validity flag.
std::string name
 File name.
std::string path
 File path.
std::string fullName
 Full name of file (including path).

Detailed Description

File.

A wrapper for various file properties and operations.


Constructor & Destructor Documentation

Ionflux::Tools::File::File  ) 
 

Constructor.

Construct new File object.

Ionflux::Tools::File::File const std::string &  initFullName  ) 
 

Constructor.

Construct new File object.

Parameters:
initFullName Full name of file (including path).

Ionflux::Tools::File::~File  )  [virtual]
 

Destructor.

Destruct File object.


Member Function Documentation

time_t Ionflux::Tools::File::getAccessTime  )  [virtual]
 

Get access time.

Get the time of last access.

Returns:
Time of last access.

time_t Ionflux::Tools::File::getChangeTime  )  [virtual]
 

Get change time.

Get the time of last status change.

Returns:
Time of last status change.

std::string Ionflux::Tools::File::getFullName  )  const [virtual]
 

Get full name of file (including path).

Returns:
Current value of full name of file (including path).

time_t Ionflux::Tools::File::getModTime  )  [virtual]
 

Get modification time.

Get the time of last modification.

Returns:
Time of last modification.

std::string Ionflux::Tools::File::getName  )  const [virtual]
 

Get file name.

Returns:
Current value of file name.

std::string Ionflux::Tools::File::getPath  )  const [virtual]
 

Get file path.

Returns:
Current value of file path.

unsigned int Ionflux::Tools::File::getSize  )  [virtual]
 

Get file size.

Get the total size of the file.

Returns:
File size.

bool Ionflux::Tools::File::isDir  )  [virtual]
 

Get directory status.

Get the directory status flag for the file.

Returns:
true if the file is a directory, false otherwise.

bool Ionflux::Tools::File::isValid  )  [virtual]
 

Check validity.

Check the validity of the file.

Returns:
true if the file is valid, false otherwise.

void Ionflux::Tools::File::refresh  )  [virtual]
 

Refresh file.

Refresh file status information.

void Ionflux::Tools::File::setFullName const std::string &  newFullName  )  [virtual]
 

Set full name of file (including path).

Set new value of full name of file (including path).

Parameters:
newFullName New value of full name of file (including path).

void Ionflux::Tools::File::setName const std::string &  newName  )  [virtual]
 

Set file name.

Set new value of file name.

Parameters:
newName New value of file name.

void Ionflux::Tools::File::setPath const std::string &  newPath  )  [virtual]
 

Set file path.

Set new value of file path.

Parameters:
newPath New value of file path.

bool Ionflux::Tools::File::updateStatInfo  )  [protected, virtual]
 

Update stat information.

Updates the file information obtained from stat.

Returns:
true on success, false otherwise.


Member Data Documentation

time_t Ionflux::Tools::File::accessTime [protected]
 

Time of last access.

time_t Ionflux::Tools::File::changeTime [protected]
 

Time of last status change.

std::string Ionflux::Tools::File::fullName [protected]
 

Full name of file (including path).

time_t Ionflux::Tools::File::modTime [protected]
 

Time of last modification.

std::string Ionflux::Tools::File::name [protected]
 

File name.

std::string Ionflux::Tools::File::path [protected]
 

File path.

unsigned int Ionflux::Tools::File::size [protected]
 

File size.

struct stat Ionflux::Tools::File::statInfo [protected]
 

Information returned by stat.

bool Ionflux::Tools::File::validity [protected]
 

Validity flag.


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 21:08:11 2006 for Ionflux Tools Class Library (iftools) by  doxygen 1.4.6