overwolf.io

Use the overwolf.io API to check if a certain file exists or to write content to a file.

For more I/O functionalities, please use our simple I/O plugin

Methods

fileExists(filePath, callback)

Version added: 0.93.1

Checks for the existance of the file in the given path.

  • Parameter: filePath <string>

    The path to check for.
  • Parameter: callback <function>

    Returns with the result.
Callback argument:
{
    "status": "success",
    "found": true
}

writeFileContents(filePath, content, encoding, triggerUacIfRequired, callback)

Version added: 0.93.1

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.

Permissions required: FileSystem

  • Parameter: filePath <string>

    The full path of the file to write to.

  • Parameter: content <string>

    The content to write.

  • Parameter: encoding <eEncoding>

    The encoding to use, see more at eEncoding.

  • Parameter: triggerUacIfRequired <bool>

    If additional permissions are required, allows the triggering of the Windows UAC dialog.

  • Parameter: callback <function>

    Called with the status of the request.
Callback argument:
{
    "status": "success"
}

Types

eEncoding

File encoding.

Options

UTF8

UTF8BOM

Unicode

UnicodeBOM

ASCII