StorageObject

StorageObject

new StorageObject(_filename, _directory)

Properties:
Name Type Description
filename string

The filename for the object currently accessing

directory string

Directory where the file exists

location string

Absolute file location

hasUpdated bool

If true there are pending changes to sync.

Source:
Parameters:
Name Type Description
_filename string

A Valid JSON Filename

_directory string

A Valid Directory

Methods

get() → {*}

Source:
Returns:
Type:
*

Data stored in _data.meta.content

resetID()

Reset the storage objects Unique Identifier

Source:

set(data) → {*}

Source:
Parameters:
Name Type Description
data *

Set this StorageObjects content

Returns:
Type:
*

_data.meta.content

sync()

Sync data from the StorageObject to the File if there are changes or sync the File to this StorageObject if there are no pending changes.

Source: