Table of Contents

Interface IGameDatabaseAPI

Namespace
Playnite.SDK
Assembly
Playnite.SDK.dll

Describes object providing game database API.

public interface IGameDatabaseAPI : IGameDatabase
Inherited Members

Properties

DatabasePath

Gets full path to database directory location.

string DatabasePath { get; }

Property Value

string

Methods

AddFile(string, Guid)

Add file to data storage.

string AddFile(string path, Guid parentId)

Parameters

path string

Path of the file to be added.

parentId Guid

Databse item parent containning the file.

Returns

string

Database id of added file.

BeginBufferUpdate()

Begins buffered update. Suppresses all notification events until buffering is stopped.

void BeginBufferUpdate()

BufferedUpdate()

Switches database to buffered mode. Suppresses all notification events until buffering is stopped.

IDisposable BufferedUpdate()

Returns

IDisposable

Buffer object.

EndBufferUpdate()

Ends buffered update.

void EndBufferUpdate()

GetFileStoragePath(Guid)

Returns full path to directory storing files for specified parent.

string GetFileStoragePath(Guid parentId)

Parameters

parentId Guid

Id of parent object.

Returns

string

Full path to directory.

GetFullFilePath(string)

Returns full path to a file based on database path.

string GetFullFilePath(string databasePath)

Parameters

databasePath string

Database path as set to game's field.

Returns

string

Full path to a file.

RemoveFile(string)

Removes file from database.

void RemoveFile(string id)

Parameters

id string

File id.

SaveFile(string, string)

Exports file from database.

void SaveFile(string id, string path)

Parameters

id string

File id.

path string

Full path to target file.