nx.js
NamespacesSwitchFunctions

writeFileSync

writeFileSync(path, data): void

Synchronously writes the contents of data to the file at path.

Parameters

ParameterType
pathPathLike
datastring | BufferSource

Returns

void

Example

const appStateJson = JSON.stringify(appState);
Switch.writeFileSync('sdmc:/switch/awesome-app/state.json', appStateJson);

On this page