ScummVM API documentation
MTropolis::VirtualFileSystem Class Reference
Inheritance diagram for MTropolis::VirtualFileSystem:
Common::Archive

Public Member Functions

 VirtualFileSystem (const VirtualFileSystemLayout &layout)
 
bool hasFile (const Common::Path &path) const override
 
bool isPathDirectory (const Common::Path &path) const override
 
int listMembers (Common::ArchiveMemberList &list) const override
 
const Common::ArchiveMemberPtr getMember (const Common::Path &path) const override
 
Common::SeekableReadStreamcreateReadStreamForMember (const Common::Path &path) const override
 
Common::SeekableReadStreamcreateReadStreamForMemberAltStream (const Common::Path &path, Common::AltStreamType altStreamType) const override
 
int listMatchingMembers (Common::ArchiveMemberList &list, const Common::Path &pattern, bool matchPathComponents=false) const override
 
char getPathSeparator () const override
 
- Public Member Functions inherited from Common::Archive
virtual SeekableReadStreamcreateReadStreamForMemberNext (const Path &path, const Archive *starting) const
 
Common::Error dumpArchive (const Path &destPath)
 

Member Function Documentation

◆ hasFile()

bool MTropolis::VirtualFileSystem::hasFile ( const Common::Path path) const
overridevirtual

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.

Implements Common::Archive.

◆ isPathDirectory()

bool MTropolis::VirtualFileSystem::isPathDirectory ( const Common::Path path) const
overridevirtual

Check if a member with the given name exists and is a directory.

Reimplemented from Common::Archive.

◆ listMembers()

int MTropolis::VirtualFileSystem::listMembers ( Common::ArchiveMemberList list) const
overridevirtual

Add all members of the Archive to the list. Must only append to list, and not remove elements from it.

Returns
The number of names added to list.

Implements Common::Archive.

◆ getMember()

const Common::ArchiveMemberPtr MTropolis::VirtualFileSystem::getMember ( const Common::Path path) const
overridevirtual

Return an ArchiveMember representation of the given file.

Implements Common::Archive.

◆ createReadStreamForMember()

Common::SeekableReadStream* MTropolis::VirtualFileSystem::createReadStreamForMember ( const Common::Path path) const
overridevirtual

Create a stream bound to a member with the specified name in the archive. If no member with this name exists, 0 is returned.

Returns
The newly created input stream.

Implements Common::Archive.

◆ createReadStreamForMemberAltStream()

Common::SeekableReadStream* MTropolis::VirtualFileSystem::createReadStreamForMemberAltStream ( const Common::Path path,
Common::AltStreamType  altStreamType 
) const
overridevirtual

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.

Returns
The newly created input stream.

Reimplemented from Common::Archive.

◆ listMatchingMembers()

int MTropolis::VirtualFileSystem::listMatchingMembers ( Common::ArchiveMemberList list,
const Common::Path pattern,
bool  matchPathComponents = false 
) const
overridevirtual

Add all members of the Archive matching the specified pattern to the list. Must only append to list, and not remove elements from it.

Parameters
matchPathComponentsif set, then whole string will be matched, otherwise (default), path separator ('/') does not match with wildcards
Returns
The number of members added to list.

Reimplemented from Common::Archive.

◆ getPathSeparator()

char MTropolis::VirtualFileSystem::getPathSeparator ( ) const
overridevirtual

Returns the separator used by internal paths in the archive

Reimplemented from Common::Archive.


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