PropaneFS Class Reference

A class for managing storing data in a user-specific location across platforms, instead of in the program directory. Future operating systems, like OS X 10.5 and Vista, discourage storing data in the program directory. More...

#include <PropaneFS.h>

List of all members.

Public Member Functions

virtual void createDirectory (std::string path)
 Creates a new directory in the system data path.
virtual std::string getUserDataPath (std::string f)
 Gets the user path for save games (currently, the same as the system path).
virtual std::string getSystemDataPath (std::string f)
 Gets the system path (usually, ~/Library or My Documents).
virtual bool fileExists (std::string path)
 Returns true if a file exists at a given path.
virtual void createPackageDirectories ()
 Creates directories for this FS package automatically in the user and system directories.
std::string getDirectorySeparator ()
 Returns the directory seperator for this operating system.
virtual std::list< std::string > getDirectoryContents (std::string d)
 Returns a list of filenames making up the files and folders in the first level of a directory.
 PropaneFS (std::string PackageName)
 Initialize with a given game package name (this is the name it will use when making new game folders).
virtual ~PropaneFS ()
 Destructor, currently unused.

Protected Attributes

std::string m_packageName
 Internal storage for the filesystem package name.


Detailed Description

A class for managing storing data in a user-specific location across platforms, instead of in the program directory. Future operating systems, like OS X 10.5 and Vista, discourage storing data in the program directory.


Constructor & Destructor Documentation

PropaneFS::PropaneFS std::string  PackageName  ) 
 

Initialize with a given game package name (this is the name it will use when making new game folders).

Default constructor for a PropaneFS object.

Parameters:
PackageName The name for your game packages, that will be used for the save folder (e.g. "Glow") Be careful of using spaces in this filename, though it has been guaranteed to work on Mac OS X and Windows NT, it may not work on other operating systems.


Member Function Documentation

void PropaneFS::createPackageDirectories  )  [virtual]
 

Creates directories for this FS package automatically in the user and system directories.

Creates the proper directories in the user path for your packages, in the format /PackageName.

System path is not yet supported, but will be, although under NT and OS X the system and user paths are identical.

bool PropaneFS::fileExists std::string  path  )  [virtual]
 

Returns true if a file exists at a given path.

Uses the operating system to see if a given file exists.

Parameters:
path The path to the file (e.g. "C:\\MyFile.doc")
Returns:
True if the file exists, false otherwise.


The documentation for this class was generated from the following files:
Generated on Sun Jan 14 16:49:11 2007 for Propane Injector by  doxygen 1.4.6