Skip to content

ElectronBrowserWindow.previewFile method

ElectronBrowserWindow › previewFile

Unofficial

Uses Quick Look to preview a file at a given path (macOS only).

Signature:

previewFile(path: string, displayName?: string | undefined): void

Parameters:

ParameterTypeDescription
pathstringThe path to the file to preview.
displayName?string | undefinedThe name of the file to display in the Quick Look modal view.

Returns: void