writeFileSync
writeFileSync(path, data): void
Synchronously writes the contents of data to the file at path.
Parameters
| Parameter | Type |
|---|---|
path | PathLike |
data | string | BufferSource |
Returns
void
Example
const appStateJson = JSON.stringify(appState);
Switch.writeFileSync('sdmc:/switch/awesome-app/state.json', appStateJson);