Main Page   Modules   Class Hierarchy   Compound List   Compound Members  

GAUGE3D::GDirectory Class Reference

Abstract interface to a directory. More...

#include <gauge3d/files/directory.h>

Inherits GAUGE3D::GObject.

Inherited by GAUGE3D::GDiskDirectory, and GAUGE3D::GVirtualDirectory.

List of all members.

Public Methods

virtual ~GDirectory ()
virtual GArray<GStringListFiles ()=0
 Get a list of all the files in the directory.

virtual GArray<GStringListSubdirs ()=0
 Get a list of all the subdirectories of the directory.

virtual pGFile OpenFile (GString name)=0
 Get a pointer to a file in the directory. More...

virtual pGDirectory OpenSubdir (GString name)=0
 Get a pointer to a sub directory in the directory. More...

virtual pGFile AddFile (GString name)=0
 Create a new file in the directory. More...

virtual pGDirectory AddSubdir (GString name)=0
 Create a new sub directory to the directory. More...

virtual void RemoveFile (GString name)=0
 Remove a file from the dircetory.

virtual void RemoveDirectory (GString name)=0
 Remove a sub directory from the directory (recursively if necessary).


Detailed Description

Abstract interface to a directory.

This could represents a directory on the hard drive, but it could also represent anything from a compressed archive to an ftp site. Archive plugins should be derived from this.


Member Function Documentation

pGFile GAUGE3D::GDirectory::OpenFile ( GString name ) [pure virtual]
 

Get a pointer to a file in the directory.

Parameters:
name   The name of the file to open.
Remarks:
Use this to open the contents of a directory. This way, if you have a pointer to the root directory of any filesystem, you can access everything in the system.
Note:
It is perfectly legal to say:
  • myDirectory.OpenFile("this/is/a/deeply/nested/file");
Likewise with OpenSubdir(). You need not manually traverse the directory tree.
Always use forward slashes ('/') to separate directories. Using back slashes ('\') will not work, even on Windows.

Reimplemented in GAUGE3D::GDiskDirectory, and GAUGE3D::GVirtualDirectory.

pGDirectory GAUGE3D::GDirectory::OpenSubdir ( GString name ) [pure virtual]
 

Get a pointer to a sub directory in the directory.

Parameters:
name   The name of the sub directory to open.
Remarks:
Use this to open the contents of a directory. This way, if you have a pointer to the root directory of any filesystem, you can access everything in the system.
Note:
It is perfectly legal to say:
  • myDirectory.OpenFile("this/is/a/deeply/nested/subdir");
Likewise with OpenSubdir(). You need not manually traverse the directory tree.
Always use forward slashes ('/') to separate directories. Using back slashes ('\') will not work, even on Windows.

Reimplemented in GAUGE3D::GDiskDirectory, and GAUGE3D::GVirtualDirectory.

pGFile GAUGE3D::GDirectory::AddFile ( GString name ) [pure virtual]
 

Create a new file in the directory.

Parameters:
name   The name of the file to create.
Returns:
A pointer to the new file, or NULL if the file already existed or could not be created.

Reimplemented in GAUGE3D::GDiskDirectory, and GAUGE3D::GVirtualDirectory.

pGDirectory GAUGE3D::GDirectory::AddSubdir ( GString name ) [pure virtual]
 

Create a new sub directory to the directory.

Parameters:
name   The name of the sub directory to create.
Returns:
A pointer to the new directory, or NULL if the directory already existed or could not be created.

Reimplemented in GAUGE3D::GDiskDirectory, and GAUGE3D::GVirtualDirectory.


The documentation for this class was generated from the following file:
Generated at Tue Jan 30 17:07:34 2001 for gauge3d by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000