Logo


search API (or start typing anywhere)


IO

snow.systems.io.IO defined in ``


class
meta: @:allow(snow.Snow)


 

Members


module
module : snow.types.ModuleIO
Access to the platform specific api, if any
string_save_prefix
string_save_prefix : String
The string_save file name prefix. For example, the default being slot.0, by changing this you can rename the save slots to custom.0. Only the prefix will change, the slot index is always appended with . for predictability.

Methods


app_pathinline
app_path() : String

app_path_prefsinline

app_path_prefs() : String

data_flow

data_flow<T>(_id:String, _processor:snow.Snow  -> String  -> data_flow.T -> snow.api.Promise, _provider:snow.Snow  -> String -> snow.api.Promise) : snow.api.Promise
Returns a promise for data, optionally provided by the given provider, and optionally processed by the given processor.

data_loadinline

data_load(_path:String, _options:snow.types.IODataOptions) : snow.api.Promise
Load bytes from the file path/url given. On web a request is sent for the data

data_saveinline

data_save(_path:String, _data:snow.api.buffers.Uint8Array, _options:snow.types.IODataOptions) : Bool
Save bytes to the file path/url given. On platforms where this doesn’t make sense (web) this will do nothing atm

string_destroy

string_destroy(_slot:Int) : Bool
Destroy a specific string slot, removing all values stored. Does not ask for confirmation. Returns true if successful, false otherwise.

string_load

string_load(_key:String, _slot:Int) : String
Load a string value by key, with an optional slot. Works on all targets as a simple save/load mechanism. Returns the string or null if the key was invalid, or the slot was not found.

string_save

string_save(_key:String, _value:String, _slot:Int) : Bool
Save a string value by key, with an optional slot. To remove a saved key, pass value in as null. Works on all targets as a simple save/load mechanism. Data saved is plain text but obscured with basic encoding. Any further obfuscation can be done on the value prior to saving. Returns false if the save failed, errors being logged.

string_save_path

string_save_path(_slot:Int) : String
Returns the path where string_save operates. One targets where this is not a path, the path will be prefaced with < >/, i.e on web targets the path will be <localstorage>/ followed by the ID.

url_openinline

url_open(_url:String) : Void
Call this to open a url in the default browser