OpenMW
Public Types | Public Member Functions | Private Attributes
Files::MultiDirCollection Class Reference

File collection across several directories. More...

#include <multidircollection.hpp>

List of all members.

Public Types

typedef std::map< std::string,
boost::filesystem::path,
NameLess
TContainer
typedef TContainer::const_iterator TIter

Public Member Functions

 MultiDirCollection (const Files::PathContainer &directories, const std::string &extension, bool foldCase)
boost::filesystem::path getPath (const std::string &file) const
bool doesExist (const std::string &file) const
TIter begin () const
 Return iterator pointing to the first file.
TIter end () const
 Return iterator pointing past the last file.

Private Attributes

TContainer mFiles

Detailed Description

File collection across several directories.

This class lists all files with one specific extensions within one or more directories. If the same file appears more than once, the file in the directory with the higher priority is used.


Member Typedef Documentation

typedef std::map<std::string, boost::filesystem::path, NameLess> Files::MultiDirCollection::TContainer
typedef TContainer::const_iterator Files::MultiDirCollection::TIter

Constructor & Destructor Documentation

Files::MultiDirCollection::MultiDirCollection ( const Files::PathContainer directories,
const std::string &  extension,
bool  foldCase 
)

Directories are listed with increasing priority.

Parameters:
extensionThe extension that should be listed in this collection. Must contain the leading dot.
foldCaseIgnore filename case

Member Function Documentation

Return iterator pointing to the first file.

bool Files::MultiDirCollection::doesExist ( const std::string &  file) const
Returns:
Does a file with the given name exist?

Return iterator pointing past the last file.

boost::filesystem::path Files::MultiDirCollection::getPath ( const std::string &  file) const

Return full path (including filename) of file.

If the file does not exist, an exception is thrown. file must include the extension.


Member Data Documentation


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