function getIconForFile()

in src/file_icon_map.js [624:637]


function getIconForFile(name = '') {
  const directMatch = fileNameIcons[name];
  if (directMatch) return directMatch;

  const dotPositions = [...name.matchAll(/\./g)].map((match) => match.index);
  if (dotPositions.length === 0) return '';

  return (
    getDeepExtensionIcon(threeFileExtensionIcons, name, getPosition(dotPositions, 3)) ||
    getDeepExtensionIcon(twoFileExtensionIcons, name, getPosition(dotPositions, 2)) ||
    fileExtensionIcons[name.substring(getPosition(dotPositions, 1)).toLowerCase()] ||
    ''
  );
}