#include <archive.h>
Public Types | |
| enum | ListMode { kListFilesOnly = 1 , kListDirectoriesOnly = 2 , kListAll = 3 } |
Public Member Functions | |
| virtual bool | hasFile (const Path &path) const =0 |
| virtual bool | isPathDirectory (const Path &path) const |
| virtual int | listMatchingMembers (ArchiveMemberList &list, const Path &pattern, bool matchPathComponents=false) const |
| virtual int | listMembers (ArchiveMemberList &list) const =0 |
| virtual const ArchiveMemberPtr | getMember (const Path &path) const =0 |
| virtual SeekableReadStream * | createReadStreamForMember (const Path &path) const =0 |
| virtual SeekableReadStream * | createReadStreamForMemberAltStream (const Path &path, AltStreamType altStreamType) const |
| virtual SeekableReadStream * | createReadStreamForMemberNext (const Path &path, const Archive *starting) const |
| Common::Error | dumpArchive (const Path &destPath) |
| virtual char | getPathSeparator () const |
| virtual bool | getChildren (const Common::Path &path, Common::Array< Common::String > &list, ListMode mode=kListDirectoriesOnly, bool hidden=true) const |
The Archive class allows for managing the members of arbitrary containers in a uniform fashion, allowing lookup by (file) names. It also supports opening a file and returning a usable input stream.
|
pure virtual |
Check if a member with the given name is present in the Archive. Patterns are not allowed, as this is meant to be a quick File::exists() replacement. This returns "true" for both files and directories.
Implemented in Stark::Formats::XARCArchive, AndroidAssetArchive, Common::ClickteamInstaller, Common::InstallShieldV3, Common::ProDOSDisk, Director::ProjectorArchive, Director::SavedArchive, DreamWeb::RNCAArchive, Got::ResArchive, Grim::Lab, Grim::LangFilter, Grim::MsCabinet, Harvester::XFileArchive, Hypno::LibFile, Kyra::PlainArchive, Kyra::TlkArchive, Kyra::CachedArchive, Macs2::Macs2AmigaArchive, MADS::MpsArchive, MADS::RexNebular::MpsInstaller, MM::Shared::Xeen::BaseCCArchive, Mohawk::InstallerArchive, MTropolis::VirtualFileSystem, Nancy::CifTree, Nancy::PatchTree, NGI::NGIArchive, Prince::PtcArchive, Tetraedge::ObbArchive, Tinsel::PsxArchive, Trecision::FastFile, Ultima::Shared::UltimaDataArchive, Ultima::Shared::UltimaDataArchiveProxy, Ultima::Shared::Resources, Ultima::Ultima8::U8SaveFile, WaynesWorld::GxlArchive, Wintermute::PackageSet, ZVision::ZfsArchive, Common::SearchSet, Common::SpectrumTapeArchive, and Common::FSDirectory.
|
virtual |
Check if a member with the given name exists and is a directory.
Reimplemented in MTropolis::VirtualFileSystem, Ultima::Shared::UltimaDataArchive, Ultima::Shared::UltimaDataArchiveProxy, Common::SearchSet, and Common::FSDirectory.
|
virtual |
Add all members of the Archive matching the specified pattern to the list. Must only append to list, and not remove elements from it.
| matchPathComponents | if set, then whole string will be matched, otherwise (default), path separator ('/') does not match with wildcards |
Reimplemented in Common::SearchSet, Common::FSDirectory, Stark::Formats::XARCArchive, MTropolis::VirtualFileSystem, Ultima::Shared::UltimaDataArchive, and Ultima::Shared::UltimaDataArchiveProxy.
|
pure virtual |
Add all members of the Archive to the list. Must only append to list, and not remove elements from it.
Implemented in Common::SearchSet, Common::SpectrumTapeArchive, Common::FSDirectory, Common::ClickteamInstaller, DreamWeb::RNCAArchive, MADS::RexNebular::MpsInstaller, Tetraedge::ObbArchive, Stark::Formats::XARCArchive, AndroidAssetArchive, Common::InstallShieldV3, Common::ProDOSDisk, Director::ProjectorArchive, Director::SavedArchive, Got::ResArchive, Grim::Lab, Grim::LangFilter, Grim::MsCabinet, Harvester::XFileArchive, Hypno::LibFile, Kyra::PlainArchive, Kyra::TlkArchive, Kyra::CachedArchive, Macs2::Macs2AmigaArchive, MADS::MpsArchive, MM::Shared::Xeen::BaseCCArchive, Mohawk::InstallerArchive, MTropolis::VirtualFileSystem, Nancy::CifTree, NGI::NGIArchive, Prince::PtcArchive, Tinsel::PsxArchive, Trecision::FastFile, Ultima::Shared::UltimaDataArchive, Ultima::Shared::UltimaDataArchiveProxy, Ultima::Shared::Resources, Ultima::Ultima8::U8SaveFile, WaynesWorld::GxlArchive, Wintermute::PackageSet, and ZVision::ZfsArchive.
|
pure virtual |
Return an ArchiveMember representation of the given file.
Implemented in Stark::Formats::XARCArchive, AndroidAssetArchive, Common::ClickteamInstaller, Common::InstallShieldV3, Common::ProDOSDisk, Director::ProjectorArchive, Director::SavedArchive, DreamWeb::RNCAArchive, Got::ResArchive, Grim::Lab, Grim::LangFilter, Grim::MsCabinet, Harvester::XFileArchive, Hypno::LibFile, Kyra::PlainArchive, Kyra::TlkArchive, Kyra::CachedArchive, Macs2::Macs2AmigaArchive, MADS::MpsArchive, MADS::RexNebular::MpsInstaller, MM::Shared::Xeen::BaseCCArchive, Mohawk::InstallerArchive, MTropolis::VirtualFileSystem, Nancy::CifTree, NGI::NGIArchive, Prince::PtcArchive, Tetraedge::ObbArchive, Tinsel::PsxArchive, Trecision::FastFile, Ultima::Shared::UltimaDataArchive, Ultima::Shared::UltimaDataArchiveProxy, Ultima::Shared::Resources, Ultima::Ultima8::U8SaveFile, WaynesWorld::GxlArchive, Wintermute::PackageSet, ZVision::ZfsArchive, Common::SearchSet, Common::SpectrumTapeArchive, and Common::FSDirectory.
|
pure virtual |
Create a stream bound to a member with the specified name in the archive. If no member with this name exists, 0 is returned.
Implemented in Stark::Formats::XARCArchive, AndroidAssetArchive, Common::InstallShieldV3, Common::ProDOSDisk, Director::ProjectorArchive, Director::SavedArchive, Got::ResArchive, Grim::Lab, Grim::LangFilter, Grim::MsCabinet, Harvester::XFileArchive, Hypno::LibFile, Kyra::PlainArchive, Kyra::TlkArchive, Kyra::CachedArchive, Macs2::Macs2AmigaArchive, MADS::MpsArchive, MM::Shared::Xeen::CCArchive, MM::Xeen::SaveArchive, Mohawk::InstallerArchive, MTropolis::VirtualFileSystem, Nancy::CifTree, NGI::NGIArchive, Prince::PtcArchive, Tetraedge::ObbArchive, Tinsel::PsxArchive, Trecision::FastFile, Ultima::Shared::UltimaDataArchive, Ultima::Shared::UltimaDataArchiveProxy, Ultima::Shared::Resources, Ultima::Ultima8::U8SaveFile, WaynesWorld::GxlArchive, Wintermute::PackageSet, ZVision::ZfsArchive, Common::MemcachingCaseInsensitiveArchive, Common::SearchSet, Common::SpectrumTapeArchive, and Common::FSDirectory.
|
virtual |
Create a stream bound to an alternate stream of a member with the specified name in the archive. If no member with this name exists, 0 is returned.
Reimplemented in MTropolis::VirtualFileSystem, Common::SearchSet, Common::FSDirectory, and Common::MemcachingCaseInsensitiveArchive.
|
inlinevirtual |
For most archives: same as previous. For SearchSet see SearchSet documentation.
Reimplemented in Common::SearchSet.
| Common::Error Common::Archive::dumpArchive | ( | const Path & | destPath | ) |
Dump all files from the archive to the given directory
|
virtual |
Returns the separator used by internal paths in the archive
Reimplemented in Common::SearchSet, Common::InstallShieldV3, and MTropolis::VirtualFileSystem.