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:

Parameter Type Description
path string The path to the file to preview.
displayName? string | undefined The name of the file to display in the Quick Look modal view.

Returns: void