Skip to main content

overwolf.io.writeFileContents

Overwolf APIs / overwolf / overwolf / io / writeFileContents

function writeFileContents(
filePath: string,
content: string,
encoding: eEncoding,
triggerUacIfRequired: boolean,
callback: CallbackFunction<Result>,
): void;

Writes the content to the target file. If the file doesn't exist, it will be created, along with any needed directories along the path. Otherwise, the file's content will be overwritten.

Parameters

ParameterTypeDescription
filePathstringThe full path of the file to write to.
contentstringThe content to write.
encodingeEncodingThe encoding to use, see more at
triggerUacIfRequiredbooleanIf additional permissions are required, allows the triggering of the Windows UAC dialog.
callbackCallbackFunction<Result>Called with the status of the request.

Returns

void