GodotcordStorageManager

A wrapper of the Discord Game SDK Storage Manager.

Description

A wrapper of the Discord Game SDK Storage Manager. This class is used to manage save games in the cloud.

   
string get_path()
Array read(name : string)
Array read_async(name : string)
Array read_async_partial(name : string, offset : int, length : int)
void write(data : Array)
void write_async(data : Array)
void destroy(name : string)
bool exists(name : string)
GodotcordFileStat stat(name : string)
int count()
GodotcordFileStat stat_at(index : int)

Method Descriptions

  • string get_path()

  • Array read(name : string)

Returns the content of file name


  • Array read_async(name : string)

Reads the content of name asnychronously. Returns the content using the async_data_read signal.


  • Array read_async_partial(name : string, offset : int, length : int)

Reads length bytes beginning from the offsetth byte from the file name asnychronously. Returns the content using the async_data_read signal.


  • void write(data : Array)

  • void write_async(data : Array)

Emits the signal async_data_written after the completion.


  • void destroy(name : string)

Destroys the file name.


  • bool exists(name : string)

Returns whether the file name exists.


  • GodotcordFileStat stat(name : string)

Returns the GodotcordFileStat for the file name.


  • int count()

  • GodotcordFileStat stat_at(index : int)