Introduction
Downloads
Documentation
Tutorials
Pixie Lite
Forum

Home

Platform_FileSystem_Directory Class Reference
[Platform]

Platform independent abstraction of a file system directory. More...

Inheritance diagram for Platform_FileSystem_Directory:

Platform_NULL_FileSystem_Directory Platform_Win32_FileSystem_Directory

List of all members.


Public Member Functions

virtual ~Platform_FileSystem_Directory ()
virtual const char * GetPath ()=0
virtual bool Exists ()=0
virtual void Create ()=0
virtual void Delete ()=0
virtual void Rescan ()=0
virtual int GetSubdirectoryCount ()=0
virtual const char * GetSubdirectory (int index)=0
virtual int GetFileCount ()=0
virtual const char * GetFile (int index)=0

Detailed Description

Platform independent abstraction of a file system directory.

Author:
Mattias Gustavsson
Gives access to a directory and allows for creation and deletion, as well as enumerating sub-directories and files.

Definition at line 21 of file Platform_FileSystem_Directory.h.


Constructor & Destructor Documentation

virtual Platform_FileSystem_Directory::~Platform_FileSystem_Directory (  )  [virtual]

Destructor

Definition at line 28 of file Platform_FileSystem_Directory.h.


Member Function Documentation

virtual const char* Platform_FileSystem_Directory::GetPath (  )  [pure virtual]

Retrieves the path specified when this directory object was created

Returns:
The path for the directory object

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual bool Platform_FileSystem_Directory::Exists (  )  [pure virtual]

Checks if the directory which this directory object represents exists.

Returns:
True if the directory exists, false if it doesn't

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual void Platform_FileSystem_Directory::Create (  )  [pure virtual]

Creates the directory which this directory object represent, if it doesn't already exist.

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual void Platform_FileSystem_Directory::Delete (  )  [pure virtual]

Deletes the directory which this directory object represent, if it exists.

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual void Platform_FileSystem_Directory::Rescan (  )  [pure virtual]

When the directory object is first created, it will scan the directory (if it exists) for sub-directories and files. These lists can be updated by calling this method, if you have reason to believe that the contents of the directory might have changed.

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual int Platform_FileSystem_Directory::GetSubdirectoryCount (  )  [pure virtual]

Retrieves the number of sub-directories in the directory which this directory object represents.

Returns:
The number of sub-directories to this directory

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual const char* Platform_FileSystem_Directory::GetSubdirectory ( int  index  )  [pure virtual]

Retrieves the path to the specified sub-directory.

Returns:
The sub-directory at the specified index
Parameters:
index Index of the sub-directory to get

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual int Platform_FileSystem_Directory::GetFileCount (  )  [pure virtual]

Retrieves the number of files in the directory which this directory object represents.

Returns:
The number of files in this directory

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.

virtual const char* Platform_FileSystem_Directory::GetFile ( int  index  )  [pure virtual]

Retrieves the path of the specified file

Returns:
The file at the specified index
Parameters:
index Index of the sub-file to get

Implemented in Platform_NULL_FileSystem_Directory, and Platform_Win32_FileSystem_Directory.



Pixie University and the Pixie Game Engine is created and managed by Mattias Gustavsson.
Reproduction/republishing of any material on this site without permission is strictly prohibited.