sizeSpecifies the size of icon to create. Valid values are:
16x16
32x32
48x48
Zurückgegebener Wert
stream
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;
}
}
}