Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Icon.GetIcon
Queries the Finder icon for the file or folder with the given path.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
QuickLook Files
|
2.3 |
✅ Yes |
✅ Yes |
❌ No |
✅ Yes, on macOS and Windows |
❌ No |
MBS( "Icon.GetIcon"; Path; Size )
More
MBS(
"Icon.GetIcon"; /* Queries the Finder icon for the file or folder with the given path. */
$Path; /* The path to the file or folder.e.g. "/Applications" */
$Size) /* The size of the icon picture you'd like to have. Suggested range is from 16 to 512 pixel.e.g. 512 */
Less
Parameters
Parameter |
Description |
Example |
Path |
The path to the file or folder. |
"/Applications" |
Size |
The size of the icon picture you'd like to have. Suggested range is from 16 to 512 pixel. |
512 |
Result
Container value.
Description
Queries the Finder icon for the file or folder with the given path.
Size specifies the icon size from 16 to 512 pixel. The container value returned includes PNG data with alpha, JPEG preview, filename and size.
Added Windows support in plugin version 4.2.
On Mac Server this may not work well as the Server user account has no icon database.
See also Icon.GetIconWithQuickLook.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Examples
Queries icon of iPhoto app:
MBS( "Icon.GetIcon"; "/Applications/iPhoto.app"; 512 )
See also
Release notes
- Version 13.2
- Version 11.3
Example Databases
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 28th March 2023
Icon.ClearIcon
-
Icon.GetIconWithQuickLook