#include <archive.h>
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 |
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 Common::SearchSet, Common::FSDirectory, Director::ProjectorArchive, Ultima::Shared::Resources, Ultima::Shared::UltimaDataArchiveProxy, Common::ProDOSDisk, Nancy::PatchTree, Kyra::CachedArchive, Nancy::CifTree, MM::Shared::Xeen::BaseCCArchive, Ultima::Shared::UltimaDataArchive, Kyra::TlkArchive, ZVision::ZfsArchive, Common::ClickteamInstaller, Wintermute::PackageSet, Grim::Lab, MTropolis::VirtualFileSystem, Kyra::PlainArchive, NGI::NGIArchive, Trecision::FastFile, Hypno::LibFile, LastExpress::HPFArchive, Common::InstallShieldV3, LastExpress::ResourceManager, Ultima::Ultima8::U8SaveFile, Mohawk::InstallerArchive, Prince::PtcArchive, Grim::MsCabinet, AndroidAssetArchive, Stark::Formats::XARCArchive, Grim::LangFilter, MADS::MpsInstaller, and DreamWeb::RNCAArchive.
|
virtual |
Check if a member with the given name
exists and is a directory.
Reimplemented in Common::SearchSet, Common::FSDirectory, Ultima::Shared::UltimaDataArchiveProxy, Ultima::Shared::UltimaDataArchive, and MTropolis::VirtualFileSystem.
|
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, Ultima::Shared::UltimaDataArchiveProxy, Ultima::Shared::UltimaDataArchive, MTropolis::VirtualFileSystem, and Stark::Formats::XARCArchive.
|
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::FSDirectory, Common::SearchSet, Ultima::Shared::Resources, Director::ProjectorArchive, Ultima::Shared::UltimaDataArchiveProxy, Common::ProDOSDisk, Kyra::CachedArchive, Nancy::CifTree, Ultima::Shared::UltimaDataArchive, MM::Shared::Xeen::BaseCCArchive, ZVision::ZfsArchive, Kyra::TlkArchive, Wintermute::PackageSet, Common::ClickteamInstaller, MTropolis::VirtualFileSystem, Grim::Lab, Kyra::PlainArchive, NGI::NGIArchive, Trecision::FastFile, Hypno::LibFile, LastExpress::HPFArchive, Common::InstallShieldV3, LastExpress::ResourceManager, Ultima::Ultima8::U8SaveFile, Mohawk::InstallerArchive, Prince::PtcArchive, Grim::MsCabinet, Stark::Formats::XARCArchive, AndroidAssetArchive, Grim::LangFilter, MADS::MpsInstaller, and DreamWeb::RNCAArchive.
|
pure virtual |
Return an ArchiveMember representation of the given file.
Implemented in Common::FSDirectory, Common::SearchSet, Ultima::Shared::Resources, Director::ProjectorArchive, Ultima::Shared::UltimaDataArchiveProxy, Common::ProDOSDisk, Kyra::CachedArchive, Nancy::CifTree, Ultima::Shared::UltimaDataArchive, MM::Shared::Xeen::BaseCCArchive, ZVision::ZfsArchive, Kyra::TlkArchive, Wintermute::PackageSet, Common::ClickteamInstaller, MTropolis::VirtualFileSystem, Grim::Lab, Kyra::PlainArchive, NGI::NGIArchive, Trecision::FastFile, Hypno::LibFile, LastExpress::HPFArchive, Common::InstallShieldV3, LastExpress::ResourceManager, Ultima::Ultima8::U8SaveFile, Mohawk::InstallerArchive, Prince::PtcArchive, Grim::MsCabinet, Stark::Formats::XARCArchive, AndroidAssetArchive, Grim::LangFilter, MADS::MpsInstaller, and DreamWeb::RNCAArchive.
|
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 Common::FSDirectory, Common::SearchSet, Common::MemcachingCaseInsensitiveArchive, Ultima::Shared::Resources, Director::ProjectorArchive, Ultima::Shared::UltimaDataArchiveProxy, MM::Xeen::SaveArchive, Common::ProDOSDisk, MM::Shared::Xeen::CCArchive, Ultima::Shared::UltimaDataArchive, Kyra::CachedArchive, Nancy::CifTree, ZVision::ZfsArchive, Wintermute::PackageSet, Kyra::TlkArchive, MTropolis::VirtualFileSystem, Grim::Lab, Kyra::PlainArchive, NGI::NGIArchive, Trecision::FastFile, Hypno::LibFile, LastExpress::HPFArchive, Common::InstallShieldV3, LastExpress::ResourceManager, Ultima::Ultima8::U8SaveFile, Mohawk::InstallerArchive, Prince::PtcArchive, Grim::MsCabinet, Stark::Formats::XARCArchive, AndroidAssetArchive, and Grim::LangFilter.
|
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 Common::FSDirectory, Common::SearchSet, Common::MemcachingCaseInsensitiveArchive, and MTropolis::VirtualFileSystem.
|
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 MTropolis::VirtualFileSystem, and Common::InstallShieldV3.