A URL
instance that points to the root of the filesystem mount. You should use this to create file path references within the filesystem mount.
const dataUrl = new URL('data.json', device.url);
Commits to the disk any write operations that have occurred on this filesystem mount since the previous commit.
Failure to call this function after writes will cause the data to be lost after the application exits.
const saveStateUrl = new URL('state', device.url);
Switch.writeFileSync(saveStateUrl, 'my application state...');
device.commit(); // Write operation is persisted to the disk
Generated using TypeDoc
Represents a mounted filesystem device, such as the Save Data store for an Application / Profile pair.