Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Container.IdentifyData

Checks file type from the data.

Component Version macOS Windows Linux Server iOS SDK
Container 14.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Container.IdentifyData"; ContainerValue )   More

Parameters

Parameter Description Example
ContainerValue The container value to check.

Result

Returns text or error.

Description

Checks file type from the data.
We read the first bytes of the container and decide which file type is may be.

Supported types:

PDFPDF document.
JPEGJPEG image.
GIFGIF image.
BMPWindows BMP image
WEBPWebP image.
PNGPNG image.
TIFFTIFF image.
GIFGIF image.
SVGSVG image.
ZIPZIP file.
HEIFHEIF image file.
FMPFileMaker database.
EXEWindows executable
MachOmacOS executable
ELFLinux executable

Returns empty text in case the format is not identified. We can add more formats as needed.
Please be aware, that a container may just have the right bytes to look like another file format!

Examples

Check what is in the container field:

Set Variable [ $r; Value: MBS( "Container.IdentifyData"; MyTable::MyContainer ) ]

Release notes

Blog Entries

This function is free to use.

Created 23th December 2023, last changed 8th January 2024


Container.GetWidth - Container.IsCompressed