klyn.gui.windows.SystemIcon.get
method
public static get(path as Path, size as Int = 22, expanded as Boolean = false, volume as Boolean = false) as SystemIcon
Description

Gets a filesystem icon or null when the OS service cannot supply one. Regular files normally use their association without opening the target; Windows executables and .ico files may provide their own icon.

Parameters
ParameterDescription
pathFilePath or FolderPath; a raw Path is treated as a file.
sizePixel size, between 8 and 256 inclusive.
expandedRequest the open-folder variant.
volumeRequest an icon for a filesystem root/logical unit.
Throws
  • ValueException If path is null or size is outside its range. Example: icon = SystemIcon.get(Path.cwd, expanded=true).