Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index

Class: File

This is a base class.

Description:
This class is a wrapper around a number of system-dependant calls to get information about a file.

Data Fields
privatestring_path
privatestring_base

Constructors / Destructor
public File()
Constructor.
public File(const string& path, const string& base)
Constructor setting file name and path.
public ~File()

Methods
public virtual void path(char* path)
public virtual void base(char* base)
public virtual string name()
Return the full file name including directory path.
public virtual File* directory()
public virtual int exists()
Returns true if the file exists and false otherwise.
public virtual bool directoryExists()
Returns true if the directory containing this file exists This is a shortcut for file->directory()->exists(), and saves memory, since this method cleans up the temporary directory object.
public virtual int size()
Returns the size of the file in bytes. Returns -1 if the file does not exist or if information is unavailable.
public virtual int age()
Returns the age of the file in seconds since its last modification.
public virtual int idleTime()
Returns the time in seconds since the last access to the file.
public virtual void makeDirectory(int mode=0777)
public virtual Reader* reader()
Returns a data Reader object for input from this file.
public virtual Writer* writer(ios::openmode mode=ios::out|ios::app)
public static void list(set& s, const string& pattern)
Returns a list of files matching a template.

Operators


Alphabetic Class Index   |   Class Inheritance Tree Index   |   Tool Index