writeFile
writeFile(path, data): Promise<void>
Returns a Promise which resolves after writing the contents of data
to the file at path. Parent directories are created automatically.
Parameters
| Parameter | Type |
|---|---|
path | PathLike |
data | string | BufferSource |
Returns
Promise<void>
Example
const appStateJson = JSON.stringify(appState);
await Switch.writeFile('sdmc:/switch/awesome-app/state.json', appStateJson);