deVirtualFileSystem Class Reference

Virtual File System. More...

#include <deVirtualFileSystem.h>

List of all members.

Public Member Functions

Constructors and Destructors
 deVirtualFileSystem ()
 Creates a new virtual file system.
 ~deVirtualFileSystem ()
 Cleans up the virtual file system.
Management
bool ExistsFile (decPath &path)
 Determines if the specified file exists.
bool CanReadFile (decPath &path)
 Determines if the specified file can be read from.
bool CanWriteFile (decPath &path)
 Determines if the specified file can be written to.
bool CanDeleteFile (decPath &path)
 Determines if the specified file can be deleted.
decBaseFileReaderOpenFileForReading (decPath &path)
 Opens the specified file for reading.
decBaseFileWriterOpenFileForWriting (decPath &path)
 Opens the specified file for writing.
void DeleteFile (decPath &path)
 Deletes the specified file.
void SearchFilesMatching (dePathList &list, decPath &pattern)
 Searches for all files and directories.
int GetTypeOfFile (decPath &path)
 Retrieves the type of the specified file.
Containers
int GetContainerCount () const
 Retrieves the number of containers.
deVFSContainerGetContainerAt (int index) const
 Retrieves the container at the given position.
int IndexOfContainer (deVFSContainer *container) const
 Retrieves the index of the container or -1 if not found.
bool HasContainer (deVFSContainer *container) const
 Determines if a container exists.
void AddContainer (deVFSContainer *container)
 Adds a container.
void RemoveContainer (deVFSContainer *container)
 Removes a container.
void RemoveAllContainers ()
 Removes all containers.

Detailed Description

Virtual File System.

Manages a virtual file system. The file system is by default empty and filled with content using container objects. Each container object populates a given directory with content. This process is not the same as file system mounting therefore the content of a container object does not replace the content in the directory but adds to it. Already existing files and directories are shadowed. Therefore the order of the container objects is important. Container objects shadow files and directories defined by container objects located before them.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

deVirtualFileSystem::deVirtualFileSystem (  )

Creates a new virtual file system.

deVirtualFileSystem::~deVirtualFileSystem (  )

Cleans up the virtual file system.


Member Function Documentation

void deVirtualFileSystem::AddContainer ( deVFSContainer container )

Adds a container.

bool deVirtualFileSystem::CanDeleteFile ( decPath path )

Determines if the specified file can be deleted.

bool deVirtualFileSystem::CanReadFile ( decPath path )

Determines if the specified file can be read from.

bool deVirtualFileSystem::CanWriteFile ( decPath path )

Determines if the specified file can be written to.

void deVirtualFileSystem::DeleteFile ( decPath path )

Deletes the specified file.

bool deVirtualFileSystem::ExistsFile ( decPath path )

Determines if the specified file exists.

deVFSContainer* deVirtualFileSystem::GetContainerAt ( int  index ) const

Retrieves the container at the given position.

int deVirtualFileSystem::GetContainerCount (  ) const [inline]

Retrieves the number of containers.

int deVirtualFileSystem::GetTypeOfFile ( decPath path )

Retrieves the type of the specified file.

bool deVirtualFileSystem::HasContainer ( deVFSContainer container ) const

Determines if a container exists.

int deVirtualFileSystem::IndexOfContainer ( deVFSContainer container ) const

Retrieves the index of the container or -1 if not found.

decBaseFileReader* deVirtualFileSystem::OpenFileForReading ( decPath path )

Opens the specified file for reading.

decBaseFileWriter* deVirtualFileSystem::OpenFileForWriting ( decPath path )

Opens the specified file for writing.

void deVirtualFileSystem::RemoveAllContainers (  )

Removes all containers.

void deVirtualFileSystem::RemoveContainer ( deVFSContainer container )

Removes a container.

void deVirtualFileSystem::SearchFilesMatching ( dePathList list,
decPath pattern 
)

Searches for all files and directories.

All found files and directories are added to the file listing.


The documentation for this class was generated from the following file: