Skip to content

Function: getIconForFile()

ts
function getIconForFile(
  fileName: string,
  opened: boolean,
  light: boolean,
): string;

Returns the icon URL for a file, based on its name or extension. Falls back to the default file icon if no match is found.

Parameters

ParameterTypeDefault valueDescription
fileNamestringundefinedThe name of the file (with extension).
openedbooleanfalse-
lightbooleantrue-

Returns

string

The URL string for the file icon.