Handles LZS compressed archives.
More...
#include <VGearsLGPArchive.h>
|
| LGPArchive (const String &name, const String &arch_type) |
| Constructor. More...
|
|
virtual | ~LGPArchive () |
| Destructor. More...
|
|
bool | isCaseSensitive () const |
| Checks whether this archive is case sensitive. More...
|
|
void | load () |
| Loads the archive. More...
|
|
void | unload () |
| Unloads the archive. More...
|
|
Ogre::DataStreamPtr | open (const String &filename, bool readOnly=true) const |
| Opens a stream on a LGP compressed file. More...
|
|
Ogre::DataStreamPtr | create (const String &filename) const |
| Creates a new file (or overwrite one already there). More...
|
|
void | remove (const String &filename) const |
| Deletes a named file. More...
|
|
Ogre::StringVectorPtr | list (bool recursive=true, bool dirs=false) const |
| Lists all file names in the archive. More...
|
|
Ogre::FileInfoListPtr | listFileInfo (bool recursive=true, bool dirs=false) const |
| Lists all files in the archive with accompanying information. More...
|
|
Ogre::StringVectorPtr | find (const String &pattern, bool recursive=true, bool dirs=false) const |
| Finds all file or directory names matching a given pattern in the archive. More...
|
|
Ogre::FileInfoListPtr | findFileInfo (const String &pattern, bool recursive=true, bool dirs=false) const |
| Finds all files or directories matching a given pattern in this archive and get some detailed information about them. More...
|
|
bool | exists (const String &filename) const |
| Checks if the named file exists. More...
|
|
time_t | getModifiedTime (const String &filename) const |
| Retrieve the modification time of a given file. More...
|
|
virtual FileList & | GetFiles () |
| Retrieves the files in the archive. More...
|
|
|
void | Load (Ogre::DataStream *lgp) |
| Loads a LGP archive. More...
|
|
Handles LZS compressed archives.
◆ FileList
◆ LGPArchive()
VGears::LGPArchive::LGPArchive |
( |
const String & |
name, |
|
|
const String & |
arch_type |
|
) |
| |
Constructor.
- Parameters
-
[in] | name | Name for the archive. |
[in] | arch_type | Archive type code. |
◆ ~LGPArchive()
VGears::LGPArchive::~LGPArchive |
( |
| ) |
|
|
virtual |
◆ create()
Ogre::DataStreamPtr VGears::LGPArchive::create |
( |
const String & |
filename | ) |
const |
Creates a new file (or overwrite one already there).
If the archive is read-only then this method will fail.
- Parameters
-
[in] | filename | Path to the file. |
◆ exists()
bool VGears::LGPArchive::exists |
( |
const String & |
filename | ) |
const |
Checks if the named file exists.
- Parameters
-
[in] | filename | Fully qualified filename. |
- Returns
- True if FILENAME exists in the archive, false otherwise.
◆ find()
Ogre::StringVectorPtr VGears::LGPArchive::find |
( |
const String & |
pattern, |
|
|
bool |
recursive = true , |
|
|
bool |
dirs = false |
|
) |
| const |
Finds all file or directory names matching a given pattern in the archive.
- Parameters
-
[in] | pattern | The pattern to search for, wildcards (*) are allowed. |
[in] | recursive | Whether all paths of the archive are searched (if the archive has a concept of that). |
[in] | dirs | True to list only directories, false to list only files. |
- Returns
- A list of filenames matching the criteria, all fully qualified.
◆ findFileInfo()
Ogre::FileInfoListPtr VGears::LGPArchive::findFileInfo |
( |
const String & |
pattern, |
|
|
bool |
recursive = true , |
|
|
bool |
dirs = false |
|
) |
| const |
Finds all files or directories matching a given pattern in this archive and get some detailed information about them.
- Parameters
-
[in] | pattern | The pattern to search for, wildcards (*) are allowed. |
[in] | recursive | Whether all paths of the archive are searched (if the archive has a concept of that). |
[in] | dirs | True to list only directories, false to list only files. |
- Returns
- A list of file information structures for all files matching the criteria.
◆ GetFiles()
Retrieves the files in the archive.
- Returns
- The list of files.
◆ getModifiedTime()
time_t VGears::LGPArchive::getModifiedTime |
( |
const String & |
filename | ) |
const |
Retrieve the modification time of a given file.
- Parameters
-
[in] | filename | Fully qualified filename. |
- Returns
- Last-modified timestamp.
◆ isCaseSensitive()
bool VGears::LGPArchive::isCaseSensitive |
( |
| ) |
const |
|
inline |
Checks whether this archive is case sensitive.
- Returns
- Always true.
◆ list()
Ogre::StringVectorPtr VGears::LGPArchive::list |
( |
bool |
recursive = true , |
|
|
bool |
dirs = false |
|
) |
| const |
Lists all file names in the archive.
- Parameters
-
[in] | recursive | Whether all paths of the archive are to be searched (if the archive has a concept of that). |
[in] | dirs | True to list only directories, false to list only files. |
- Returns
- A list of filenames matching the criteria, all fully qualified.
◆ listFileInfo()
Ogre::FileInfoListPtr VGears::LGPArchive::listFileInfo |
( |
bool |
recursive = true , |
|
|
bool |
dirs = false |
|
) |
| const |
Lists all files in the archive with accompanying information.
- Parameters
-
[in] | recursive | Whether all paths of the archive are to be searched (if the archive has a concept of that). |
[in] | dirs | True to list only directories, false to list only files. |
- Returns
- A list of structures detailing quite a lot of information about all the files in the archive.
◆ load()
void VGears::LGPArchive::load |
( |
| ) |
|
◆ Load()
void VGears::LGPArchive::Load |
( |
Ogre::DataStream * |
lgp | ) |
|
|
protected |
Loads a LGP archive.
- Parameters
-
[in] | lgp | The contents of the archive. |
◆ open()
Ogre::DataStreamPtr VGears::LGPArchive::open |
( |
const String & |
filename, |
|
|
bool |
readOnly = true |
|
) |
| const |
Opens a stream on a LGP compressed file.
- Parameters
-
[in] | filename | Path to open the stream on. |
[in] | readOnly | TRue to open the stream in read-only mode, false to allow writting. |
◆ remove()
void VGears::LGPArchive::remove |
( |
const String & |
filename | ) |
const |
Deletes a named file.
Not possible on read-only archives
- Parameters
-
[in] | filename | Path to the file. |
◆ unload()
void VGears::LGPArchive::unload |
( |
| ) |
|
◆ file_infos_
Ogre::FileInfoList VGears::LGPArchive::file_infos_ |
|
private |
List of information blocks about about the files in the LGP.
◆ files_
List of file sin the archive.
◆ lgp_file_
Ogre::DataStreamPtr VGears::LGPArchive::lgp_file_ |
|
private |
The documentation for this class was generated from the following files: