ix.data

Helper library for reading/writing files to the data folder.

Functions

ix.data.Delete(key, bGlobal, bIgnoreMap)

View source »

Deletes the contents of a saved file in the data/helix folder.

Parameters

  • key string

    Name of the file to delete

  • bGlobal boolean default: false

    Whether or not the data is in the data/helix folder, or the data/helix/schema folder, where schema is the name of the current schema.

  • bIgnoreMap boolean default: false

    Whether or not to ignore the map and delete from the schema folder, rather than data/helix/schema/map, where map is the name of the current map.

Returns

  • bool

    Whether or not the deletion has succeeded

ix.data.Get(key, default, bGlobal, bIgnoreMap, bRefresh)

View source »

Retrieves the contents of a saved file in the data/helix folder.

Parameters

  • key string

    Name of the file to load

  • default

    Value to return if the file could not be loaded successfully

  • bGlobal boolean default: false

    Whether or not the data is in the data/helix folder, or the data/helix/schema folder, where schema is the name of the current schema.

  • bIgnoreMap boolean default: false

    Whether or not to ignore the map and load from the schema folder, rather than data/helix/schema/map, where map is the name of the current map.

  • bRefresh boolean default: false

    Whether or not to skip the cache and forcefully load from disk.

Returns

  • any

    Value associated with the key, or the default that was given if it doesn't exists

ix.data.Set(key, value, bGlobal, bIgnoreMap)

View source »

Populates a file in the data/helix folder with some serialized data.

Parameters

  • key string

    Name of the file to save

  • value

    Some sort of data to save

  • bGlobal boolean default: false

    Whether or not to write directly to the data/helix folder, or the data/helix/schema folder, where schema is the name of the current schema.

  • bIgnoreMap boolean default: false

    Whether or not to ignore the map and save in the schema folder, rather than data/helix/schema/map, where map is the name of the current map.