deVFSDiskDirectory Class Reference

Virtual File System Disk Directory. More...

#include <deVFSDiskDirectory.h>

Inheritance diagram for deVFSDiskDirectory:
deVFSContainer

List of all members.

Public Member Functions

Constructors and Destructors
 deVFSDiskDirectory (decPath &diskPath)
 Creates a new virtual file system disk directory with mapping the given disk path to the root path '/0.
 deVFSDiskDirectory (decPath &rootPath, decPath &diskPath)
 Creates a new virtual file system disk directory with mapping the given disk path to the given root path.
virtual ~deVFSDiskDirectory ()
 Cleans up the virtual file system disk directory.
Management
decPathGetDiskPath ()
 Retrieves the disk path to map to the virtual file system.
bool GetReadOnly () const
 Determines if the disk path is read only.
void SetReadOnly (bool readOnly)
 Sets if the disk path is read only.
virtual bool ExistsFile (decPath &path)
 Determines if the specified file exists.
virtual bool CanReadFile (decPath &path)
 Determines if the specified file can be read from.
virtual bool CanWriteFile (decPath &path)
 Determines if the specified file can be written to.
virtual bool CanDeleteFile (decPath &path)
 Determines if the specified file can be deleted.
virtual decBaseFileReaderOpenFileForReading (decPath &path)
 Opens the specified file for reading.
virtual decBaseFileWriterOpenFileForWriting (decPath &path)
 Opens the specified file for writing.
virtual void DeleteFile (decPath &path)
 Deletes the specified file.
virtual void SearchFilesMatching (dePathList &list, decPath &pattern)
 Searches for all files and directories.
virtual int GetTypeOfFile (decPath &path)
 Retrieves the type of the specified file.

Detailed Description

Virtual File System Disk Directory.

Maps the content of a disk directory into the virtual file system.

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

Constructor & Destructor Documentation

deVFSDiskDirectory::deVFSDiskDirectory ( decPath diskPath )

Creates a new virtual file system disk directory with mapping the given disk path to the root path '/0.

deVFSDiskDirectory::deVFSDiskDirectory ( decPath rootPath,
decPath diskPath 
)

Creates a new virtual file system disk directory with mapping the given disk path to the given root path.

virtual deVFSDiskDirectory::~deVFSDiskDirectory (  ) [virtual]

Cleans up the virtual file system disk directory.


Member Function Documentation

virtual bool deVFSDiskDirectory::CanDeleteFile ( decPath path ) [virtual]

Determines if the specified file can be deleted.

The path is relative to the root path.

Implements deVFSContainer.

virtual bool deVFSDiskDirectory::CanReadFile ( decPath path ) [virtual]

Determines if the specified file can be read from.

The path is relative to the root path. The result of this call is usually the same as of ExistsFile unless permissions prevent reading of an existing file.

Implements deVFSContainer.

virtual bool deVFSDiskDirectory::CanWriteFile ( decPath path ) [virtual]

Determines if the specified file can be written to.

The path is relative to the root path. If a file has parent directories not existing yet they have to be created in a subsequent call to OpenFileForWriting. If this is the case return true only if the creation of the parent directories is also allowed in addition to creating a new file. If the file exists permission flags can prevent writing.

Implements deVFSContainer.

virtual void deVFSDiskDirectory::DeleteFile ( decPath path ) [virtual]

Deletes the specified file.

The path is relative to the root path.

Implements deVFSContainer.

virtual bool deVFSDiskDirectory::ExistsFile ( decPath path ) [virtual]

Determines if the specified file exists.

The path is relative to the root path.

Implements deVFSContainer.

decPath& deVFSDiskDirectory::GetDiskPath (  ) [inline]

Retrieves the disk path to map to the virtual file system.

bool deVFSDiskDirectory::GetReadOnly (  ) const [inline]

Determines if the disk path is read only.

virtual int deVFSDiskDirectory::GetTypeOfFile ( decPath path ) [virtual]

Retrieves the type of the specified file.

If the file does not exist an exception is thrown.

Implements deVFSContainer.

virtual decBaseFileReader* deVFSDiskDirectory::OpenFileForReading ( decPath path ) [virtual]

Opens the specified file for reading.

The path is relative to the root path. If the file can not be found an exception is raised. Use the CanReadFile function to test if a file can be opened for reading.

Implements deVFSContainer.

virtual decBaseFileWriter* deVFSDiskDirectory::OpenFileForWriting ( decPath path ) [virtual]

Opens the specified file for writing.

The path is relative to the root path. If the file can not be found an exception is raised. Use the CanWriteFile function to test if a file can be opened for writing. Not existing directories have to be created if the CanWriteFile function returns true for a file whose parent directory does not exist yet.

Implements deVFSContainer.

virtual void deVFSDiskDirectory::SearchFilesMatching ( dePathList list,
decPath pattern 
) [virtual]

Searches for all files and directories.

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

Implements deVFSContainer.

void deVFSDiskDirectory::SetReadOnly ( bool  readOnly )

Sets if the disk path is read only.


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