getFileIcon

abstract fun getFileIcon(path: String, options: FileIconOptions = definedExternally): Promise<NativeImage>(source)

fulfilled with the app's icon, which is a NativeImage.

Fetches a path's associated icon.

On Windows, there a 2 kinds of icons:

  • Icons associated with certain file extensions, like .mp3, .png, etc.

  • Icons inside the file itself, like .exe, .dll, .ico.

On Linux and macOS, icons depend on the application associated with file mime type.