Provides a lightweight, JSON-backed key-value store for application state,
preferences, and settings. Handles multi-user data isolation automatically.
Methods
Method new()
Initialize a new RDeskStorage manager
Arguments
app_name
Application name
storage_type
Storage type: "roaming", "local", or "shared"
Method set()
Set a key-value pair in storage
Usage
RDeskStorage$set(key, value)
Arguments
key
Character string key
value
Value to store (must be JSON serializable)
Returns
The RDeskStorage instance (invisible)
Retrieve a value from storage
Usage
RDeskStorage$get(key, default = NULL)
Arguments
key
Character string key
default
Default value to return if the key is not found
Returns
The stored value, or the default value
Remove a key from storage
Returns
The RDeskStorage instance (invisible)
Method clear()
Clear all data in this storage domain
Returns
The RDeskStorage instance (invisible)
Method keys()
List all keys currently in storage
Returns
Character vector of keys
Method path()
Get the directory path containing the storage file
Returns
Character string directory path
Method clone()
The objects of this class are cloneable with this method.
Usage
RDeskStorage$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.