Overwolf

Overwolf

  • Getting Started
  • Docs
  • API
  • Events Status
  • Blog
  • Q&A
  • Support

›overwolf.io

API Reference

  • Changelog
  • Overview

App Manifest

  • manifest.json
  • Validate your manifest

Available Game Events

  • Games IDs
  • Apex Legends
  • Call of Duty: Warzone
  • CS:GO
  • Dota 2
  • Final Fantasy XIV
  • Dota Underlords
  • Escape From Tarkov
  • Fortnite
  • Hearthstone
  • Heroes of the Storm
  • Legends of Runeterra
  • League of Legends
  • Minecraft
  • MTG Arena
  • Overwatch
  • Path of Exile
  • PUBG
  • PUBG Lite
  • Rainbow Six Siege
  • Rocket League
  • StarCraft II
  • Teamfight Tactics
  • Valorant
  • World of Tanks
  • World of Warcraft
  • World of Warships
  • Warframe
  • Various External APIs

Game Launchers Events

  • Launchers IDs
  • LOL Launcher

overwolf.benchmarking

  • overwolf.benchmarking

overwolf.campaigns

  • overwolf.campaigns.crossapp

overwolf.cryptography

  • overwolf.cryptography

overwolf.extensions

  • overwolf.extensions
  • overwolf.extensions.current
  • overwolf.extensions.sharedData
  • overwolf.extensions.io

overwolf.games

  • overwolf.games
  • overwolf.games.events
  • overwolf.games.inputTracking
  • overwolf.games.launchers
  • overwolf.games.launchers.events

overwolf.io

  • overwolf.io
  • overwolf.io.paths

overwolf.logitech

  • overwolf.logitech
  • overwolf.logitech.arx
  • overwolf.logitech.led

overwolf.media

  • overwolf.media
  • overwolf.media.audio
  • overwolf.media.replays
  • overwolf.media.videos
  • Highlights supported games

overwolf.os

  • overwolf.os
  • overwolf.os.tray

overwolf.profile

  • overwolf.profile
  • overwolf.profile.subscriptions

overwolf.settings

  • overwolf.settings
  • overwolf.settings.hotkeys
  • overwolf.settings.language
  • overwolf.settings.games

overwolf.social

  • overwolf.social
  • overwolf.social.reddit
  • overwolf.social.youtube
  • overwolf.social.discord
  • overwolf.social.gfycat
  • overwolf.social.twitter

overwolf.streaming

  • overwolf.streaming

overwolf.tobii

  • overwolf.tobii

overwolf.utils

  • overwolf.utils

overwolf.web

  • overwolf.web
  • overwolf.web.webserver
  • overwolf.web.websocket

overwolf.windows

  • overwolf.windows
Edit

overwolf.io API

Check whether a certain file exists and/or to write content into files.

tip

For app-related I/O functionalities, use the overwolf.extensions.io API.

In addition, the simple I/O plugin offers several more general I/O features that are not available through the APIs.

Methods Reference

  • overwolf.io.fileExists()
  • overwolf.io.writeFileContents()
  • overwolf.io.readFileContents()
  • overwolf.io.copyFile()
  • overwolf.io.dir()
  • overwolf.io.readBinaryFile()
  • overwolf.io.readTextFile()
  • overwolf.io.exist()
  • overwolf.io.listenOnFile()
  • overwolf.io.stopFileListener()

Types Reference

  • overwolf.io.eEncoding enum
  • overwolf.io.enums.fileListenerState enum
  • overwolf.io.ReadFileOptions Object
  • overwolf.io.ListenFileOptions Object
  • overwolf.io.DirResult Object
  • overwolf.io.FileExistsResult Object
  • overwolf.io.ReadFileContentsResult Object
  • overwolf.io.ListenOnFileResult Object
  • overwolf.io.ExistsResult Object
  • overwolf.io.ReadBinaryFileResult Object
  • overwolf.io.ReadTextFileResult Object
  • overwolf.io.FileInfo Object

fileExists(filePath, callback)

Version added: 0.93

Checks for the existence of a file in a given path.

ParameterTypeDescription
filePathstringPath to check for
callbackfunctionReturns the result
callback(Result: FileExistsResult) => voidReturns with the result

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

Version added: 0.93

Permissions required: FileSystem

Writes content into a target text file.

If the file doesn’t exist, it will be created, along with any required directories along the path. Otherwise, the file’s content will be overwritten.

ParameterTypeDescription
filePathstringPath to check for
contentstringContent to write
encodingeEncoding enumEncoding to use
triggerUacIfRequiredboolIf additional permissions are required, triggers the Windows UAC dialog
callback(Result) => voidReturns with the result

readFileContents(filePath,encoding, callback)

Version added: 0.93

Permissions required: FileSystem

Returns a string with the targeted text file’s content.

ParameterTypeDescription
filePathstringFull path of the targeted file
encodingeEncoding enumEncoding to use
callback(Result: ReadFileContentsResult) => voidReturns the result

copyFile(src, dst, overrideFile, reserved, callback)

Version added: 0.93

Permissions required: FileSystem

Copy a file from the local extension directory to a destination in the local machine.

ParameterTypeDescription
srcstringA relative file path from your extension's root folder, or a full overwolf-extension:// URI to the source file
dststringDestination absolute path to copy to including filename. See usage example below
overrideFilebool"true" if you want an existing file to be overwritten, "false" otherwise
reservedboolFor future use
callback(Result) => voidReturns with the result

Usage example

overwolf.io.copyFile("Fortnite Battle Royale 03-19-2020 14-10-18-457.mp4","C:/Users/Hal9000/AppData/Local/Overwolf/Extensions/nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp/1.0.18/copy.mp4",false,false,console.log)

dir(path, callback)

Version added: 0.141

Permissions required: FileSystem

Lists all files and folder in the target path.

ParameterTypeDescription
pathstringThe target path
callback(Result: DirResult) => voidReturns with the result

Usage example

overwolf.io.dir("C:/Users/Hal9000/Videos/Overwolf",console.log)

readBinaryFile(path, options, callback)

Version added: 0.141

Permissions required: FileSystem

Read binary file.

Reads a file's contents and returns an array of byte values.
This function is extremely slow! Use it only for small files or to get file header info using the options parameter (maxBytesToRead) to limit the amount of data to fetch.

ParameterTypeDescription
pathstringThe target path
optionsReadFileOptions object
callback(Result: ReadBinaryFileResult) => voidReturns with the result

readTextFile(path, options, callback)

Version added: 0.141

Permissions required: FileSystem

Read text file.

Reads a file's contents and returns it as text.

ParameterTypeDescription
pathstringThe target path
optionsReadFileOptions object
callback(Result: ReadTextFileResult) => voidReturns with the result

exist(path, callback)

Version added: 0.141

Permissions required: FileSystem

Is path exist.

ParameterTypeDescription
pathstringThe target path
callback(Result: ExistsResult) => voidReturns with the result

listenOnFile(id, path, option, callback)

Version added: 0.141

Permissions required: FileSystem

Start listening on file.

Stream a file (text files only), line-by-line, from the local filesystem.

ParameterTypeDescription
idstringlisten Id
pathstringfile path
optionsListenFileOptions Object
callback(Result: ListenOnFileResult) => voidReturns with the result

stopFileListener(id)

Version added: 0.141

Permissions required: FileSystem

Stop listening on file.

Stop streaming a file that you previously passed when calling listenOnFile.
There are no callbacks - as this will never fail (even if the stream doesn't exist).

ParameterTypeDescription
idstringlisten Id

stopFileListener notes

On stop, listenOnFile callback will trigger with a "truncated" state:

{
    "success" : true, 
    "error": "", 
    "state": "truncated" 
    ...
}

fileListenerState enum

File listener state.

Options
started
running
terminated
truncated

eEncoding enum

File encoding.

Options
UTF8
UTF8BOM
Unicode
UnicodeBOM
ASCII

ReadFileOptions Object

Version added: 0.141

Describes the different options to read a file.

ParameterTypeDescription
encodingeEncoding enum
maxBytesToReadintdefault is 0 => read all file
offsetintstart reading point, default is 0

ListenFileOptions Object

Version added: 0.141

Describes the different options to listen to a file.

ParameterTypeDescription
skipToEndboolshould skip directly to end of file. default if false

DirResult Object

Version added: 0.141

List of files and folders.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
datastring[]List of files and folders

Example data

{
   "success":true,
   "path":"C:/Users/Hal9000/Videos/Overwolf",
   "data":[
      {
         "name":"Fortnite 03-19-2020 17-15-56-087.mp4",
         "type":"file"
      },
      {
         "name":"Game Events Simulator",
         "type":"dir"
      },
      {
         "name":"Game Summary",
         "type":"dir"
      }

   ]
}

FileExistsResult Object

Version added: 0.141

The result.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
foundbooleanReturn if the file exist or not

Example data

{
   "success":true,
   "found":true
}

ReadFileContentsResult Object

Version added: 0.141

the status of the request and the file contect.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
contentstringstring with the taraget file’s content

Example data

{"success":true,"content":"Hello World!"}

ListenOnFileResult Object

Version added: 0.141

The result.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
contentstringstring with the taraget line content

Example data

{
    "success" : true, // when false the callback will stop listen
    "error": "", // valid only when success = false
    "state": "started|running|terminated|truncated", // valid only when success =true (overwolf.io.enums.fileListenerState) 
    "content": "" //the line  
}

notes

  • "state" is from type overwolf.io.enums.fileListenerState.
  • Please read what happens when you call stopFileListener().

ExistsResult Object

Version added: 0.141

The result.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
existbooleanReturn if the file exist or not

Example data

{
   "success":true,
   "exist":true
}

ReadBinaryFileResult Object

Version added: 0.141

The result.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
contentstringReturn with the file content
infoFileInfo objectReturn with the file content

Example data

 {
    "success" : true,
    "error": "", 
    "content": byte[], // the file content in bytes
    "info" : {
        "eof" : true, // is EOF
        "totalRead" : 3000, // total read bytes
        "position" : 3000, // last file position
        "totalLines" :100, // total read lines
    }
}

ReadTextFileResult Object

Version added: 0.141

The result.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
contentstringReturn with the file content
infoFileInfo objectReturn with the file content

Example data

 {
    "success" : true,
    "error": "", 
    "content": byte[], // the file content in bytes
    "info" : {
        "eof" : true, // is EOF
        "totalRead" : 3000, // total read bytes
        "position" : 3000, // last file position
        "totalLines" :100, // total read lines
    }
}

FileInfo Object

Version added: 0.141

Container for the file info properties.

ParameterTypeDescription
successbooleanInherited from the "Result" Object
errorstringInherited from the "Result" Object
eofboolean
totalReadnumber
positionnumber
totalLinesnumber
Last updated on 2021-1-12 by eransharv
← overwolf.games.launchers.eventsoverwolf.io.paths →
  • Methods Reference
  • Types Reference
  • fileExists(filePath, callback)
  • writeFileContents(filePath, content, encoding, triggerUacIfRequired, callback)
  • readFileContents(filePath,encoding, callback)
  • copyFile(src, dst, overrideFile, reserved, callback)
  • dir(path, callback)
  • readBinaryFile(path, options, callback)
  • readTextFile(path, options, callback)
  • exist(path, callback)
  • listenOnFile(id, path, option, callback)
  • stopFileListener(id)
  • fileListenerState enum
  • eEncoding enum
  • ReadFileOptions Object
  • ListenFileOptions Object
  • DirResult Object
  • FileExistsResult Object
  • ReadFileContentsResult Object
  • ListenOnFileResult Object
  • ExistsResult Object
  • ReadBinaryFileResult Object
  • ReadTextFileResult Object
  • FileInfo Object
  • Legal
  • Terms overview
  • Developer's terms
  • App terms
  • Overwolf terms
  • Overwolf Privacy policy
  • Support
  • Questions and Answers
  • Discord
  • Slack
  • Facebook
  • Twitter
  • Documentation
  • Changelog
  • API
  • App Creation Process
  • Best Practices
  • Game Events status
  • Information
  • Careers
  • Fund
  • Developers Blog
  • Overwolf Appstore
  • Advertise on Overwolf