ScummVM API documentation
PAKSaveManager Class Reference
Inheritance diagram for PAKSaveManager:
Common::SaveFileManager Common::NonCopyable

Public Member Functions

void updateSavefilesList (Common::StringArray &lockedFiles) override
 
Common::InSaveFileopenRawFile (const Common::String &filename) override
 
Common::OutSaveFileopenForSaving (const Common::String &filename, bool compress=true) override
 
Common::InSaveFileopenForLoading (const Common::String &filename) override
 
bool removeSavefile (const Common::String &filename) override
 
Common::StringArray listSavefiles (const Common::String &pattern) override
 
bool exists (const Common::String &filename) override
 
- Public Member Functions inherited from Common::SaveFileManager
virtual void clearError ()
 
virtual Error getError ()
 
virtual String getErrorDesc ()
 
virtual String popErrorDesc ()
 
virtual bool renameSavefile (const String &oldName, const String &newName, bool compress=true)
 
virtual bool copySavefile (const String &oldName, const String &newName, bool compress=true)
 

Additional Inherited Members

- Protected Member Functions inherited from Common::SaveFileManager
virtual void setError (Error error, const String &errorDesc)
 
- Protected Attributes inherited from Common::SaveFileManager
Error _error
 
String _errorDesc
 

Member Function Documentation

◆ updateSavefilesList()

void PAKSaveManager::updateSavefilesList ( Common::StringArray lockedFiles)
inlineoverridevirtual

Refresh the save files list (because some new files might have been added) and remember the "locked" files list. These files cannot be used for saving or loading because they are being synced by CloudManager.

Implements Common::SaveFileManager.

◆ openRawFile()

Common::InSaveFile* PAKSaveManager::openRawFile ( const Common::String name)
inlineoverridevirtual

Open the file with the specified name in the given directory for loading. In contrast to openForLoading(), it returns a raw file instead of unpacked.

Parameters
nameName of the save file.
Returns
Pointer to an InSaveFile, or NULL if an error occurred.

Implements Common::SaveFileManager.

◆ openForSaving()

Common::OutSaveFile* PAKSaveManager::openForSaving ( const Common::String name,
bool  compress = true 
)
inlineoverridevirtual

Open the save file with the specified name in the given directory for saving.

Saved games are compressed by default, and engines are expected to always write compressed saves.

A notable exception is when uncompressed files are needed for compatibility with games not supported by ScummVM, such as character exports from the Quest for Glory series. QfG5 is a 3D game and will not be supported by ScummVM.

Parameters
nameName of the save file.
compressWhether to compress the resulting save file (default) or not.
Returns
Pointer to an OutSaveFile, or NULL if an error occurred.

Implements Common::SaveFileManager.

◆ openForLoading()

Common::InSaveFile* PAKSaveManager::openForLoading ( const Common::String name)
inlineoverridevirtual

Open the file with the specified name in the given directory for loading.

Parameters
nameName of the save file.
Returns
Pointer to an InSaveFile, or NULL if an error occurred.

Implements Common::SaveFileManager.

◆ removeSavefile()

bool PAKSaveManager::removeSavefile ( const Common::String name)
inlineoverridevirtual

Remove the given save file from the system.

Parameters
nameName of the save file to be removed.
Returns
True if no error occurred, false otherwise.

Implements Common::SaveFileManager.

◆ listSavefiles()

Common::StringArray PAKSaveManager::listSavefiles ( const Common::String pattern)
overridevirtual

List available save files matching a given pattern.

The pattern format is based on DOS patterns, also known as "glob" in the POSIX world. Refer to the Common::matchString() function for information about the precise pattern format.

Parameters
patternPattern to match. Wildcards like * or ? are allowed.
Returns
List of strings for all present file names.
See also
Common::matchString()

Implements Common::SaveFileManager.

◆ exists()

bool PAKSaveManager::exists ( const Common::String name)
inlineoverridevirtual

Checks if the savefile exists.

Parameters
nameName of the save file.
Returns
true if the file exists. false otherwise.

Implements Common::SaveFileManager.


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