Skip to content

ElectronApp.getFileIcon method

ElectronApp › getFileIcon

Unofficial

Fetches a path's associated icon.

Signature:

getFileIcon(path: string, options?: ElectronFileIconOptions | undefined): Promise<ElectronNativeImage>

Parameters:

ParameterTypeDescription
pathstringThe path whose icon to fetch.
options?ElectronFileIconOptions | undefinedOptions controlling the icon size.

Returns: Promise<ElectronNativeImage>A promise resolved with the icon.