API ReferenceSandbox
KeyStoreclass
Allows storing files by hashed keys, rather than by actual filename. This is sometimes useful.
object→KeyStore
Methods6
Showing 6 methods
public static Sandbox.KeyStore CreateGlobalCache()
Creates a keystore which is in a global cache position. The folder can be deleted at any time, and it's all fine and no-one cares.
public bool Exists(string key)
Check if a key exists
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
Returns:
bool—public byte[] Get(string key)
Get stored bytes, or return null
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
Returns:
byte[]—public void Remove(string key)
Remove a key
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
Returns:
void—public void Set(string key, byte[] data)
Store a bunch of bytes
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| data | byte[] | — |
Returns:
void—public bool TryGet(string key, byte[] data)
Get stored bytes, or return false
| Parameter | Type | Description |
|---|---|---|
| key | string | — |
| data | byte[] | — |
Returns:
bool—No results match this filter.