Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

mortic::IMount Class Reference

Mountable object on the VFS. More...

List of all members.

Public Member Functions

 IMount ()
 Constructor.
virtual ~IMount ()
 Destructor.
virtual IFileopen (std::string path, std::string filename, bool write=false, bool append=false)=0
 Opens a file.
virtual bool exists (std::string filename)=0
 Checks if a file / directory exists.
virtual bool isDirectory (std::string filename)=0
 Checks to see if the path given is a directory.
virtual std::vector< std::string > listDir (std::string path)=0
 Returns a list of files/directories in the directory.
virtual unsigned int size (std::string filename)=0
 Returns the size of a file.


Detailed Description

Mountable object on the VFS.

This object is what actaully handles files in the File Manager. This is subclassed to handle seperate types of files, from those on the harddisk to those over the internet. Once you have an instance of this class, you mount it using IFileManager::mount(). This is not classified as an IObject because it must not interfere with EManagerType values during initialization.

See also:
IFileManager

Definition at line 42 of file IFileManager.h.


Constructor & Destructor Documentation

mortic::IMount::IMount  )  [inline]
 

Constructor.

Definition at line 46 of file IFileManager.h.

virtual mortic::IMount::~IMount  )  [inline, virtual]
 

Destructor.

Definition at line 49 of file IFileManager.h.


Member Function Documentation

virtual bool mortic::IMount::exists std::string  filename  )  [pure virtual]
 

Checks if a file / directory exists.

Checks to see if the given VFS path exists.

  • filename - the file to check.
    Returns:
    True if the file exists

virtual bool mortic::IMount::isDirectory std::string  filename  )  [pure virtual]
 

Checks to see if the path given is a directory.

This is for checking the directoryness of a file. Kinda useful!

  • filename - the file to check.
    Returns:
    True if the file is a directory

virtual std::vector<std::string> mortic::IMount::listDir std::string  path  )  [pure virtual]
 

Returns a list of files/directories in the directory.

This is to check what files there are in the directory given.

  • path - the directory to list
    Returns:
    a vector of filenames/dirnames in the path

virtual IFile* mortic::IMount::open std::string  path,
std::string  filename,
bool  write = false,
bool  append = false
[pure virtual]
 

Opens a file.

Opens the file at the VFS path given.

  • path - the original path before passed to the mount
  • filename - the VFS path
  • write - open the file in write mode?
  • append - open the file at the end?
    Returns:
    the opened IFile
    See also:
    IFile

virtual unsigned int mortic::IMount::size std::string  filename  )  [pure virtual]
 

Returns the size of a file.

Directories return 0.

  • filename - the file to get the size of
    Returns:
    the file size in bytes / charecters


Generated on Sat Dec 30 21:21:59 2006 for mortic by  doxygen 1.4.4