198 bool dirs =
false) = 0;
218 bool recursive =
true,
bool dirs =
false)
const = 0;
virtual DataStreamPtr create(const String &filename) const
Create a new file (or overwrite one already there).
virtual bool isReadOnly() const
Reports whether this Archive is read-only, or whether the contents can be updated.
virtual ~Archive()
Default destructor.
virtual bool isCaseSensitive(void) const =0
Returns whether this archive is case sensitive in the way it matches files.
virtual time_t getModifiedTime(const String &filename)=0
Retrieve the modification time of a given file.
virtual FileInfoListPtr listFileInfo(bool recursive=true, bool dirs=false)=0
List all files in the archive with accompanying information.
virtual void unload()=0
Unloads the archive.
virtual void load()=0
Loads the archive.
virtual StringVectorPtr list(bool recursive=true, bool dirs=false)=0
List all file names in the archive.
virtual void remove(const String &filename) const
Delete a named file.
virtual StringVectorPtr find(const String &pattern, bool recursive=true, bool dirs=false)=0
Find all file or directory names matching a given pattern in this archive.
virtual DataStreamPtr open(const String &filename, bool readOnly=true) const =0
Open a stream on a given file.
virtual FileInfoListPtr findFileInfo(const String &pattern, bool recursive=true, bool dirs=false) const =0
Find all files or directories matching a given pattern in this archive and get some detailed informat...
Archive(const String &name, const String &archType)
Constructor - don't call direct, used by ArchiveFactory.
String mName
Archive name.
const String & getType(void) const
Return the type code of this Archive.
String mType
Archive type code.
bool mReadOnly
Read-only flag.
virtual bool exists(const String &filename)=0
Find out if the named file exists (note: fully qualified filename required)
const String & getName(void) const
Get the name of this archive.
Reference-counted shared pointer, used for objects where implicit destruction is required.
SharedPtr< StringVector > StringVectorPtr
vector< FileInfo >::type FileInfoList
SharedPtr< DataStream > DataStreamPtr
Shared pointer to allow data streams to be passed around without worrying about deallocation.
SharedPtr< FileInfoList > FileInfoListPtr
GeneralAllocatedObject ArchiveAlloc
Information about a file/directory within the archive will be returned using a FileInfo struct.
const Archive * archive
The archive in which the file has been found (for info when performing multi-Archive searches,...
size_t uncompressedSize
Uncompressed size.
String filename
The file's fully qualified name.
String basename
Base filename.
size_t compressedSize
Compressed size.
String path
Path name; separated by '/' and ending with '/'.