method getIconForFile

stream getIconForFile(string path,string size);

Argumente

Zurückgegebener Wert

This method is used to get the icon registered for the given file. The flags parameter specifies the size of the icon returned. Supported sizes are 16x16, 32x32, and 48x48.
function onSample()
{
    var imgStream = shell.getIconForFile("myFile.txt", "16x16");
    if (imgStream)
    {
        var imageBox = scene.getBoxById("imageBox");
        if (imageBox)
        {
            imageBox.src = imgStream;
        }
    }
}