| DetectFileType |
| |
Detect the type of a file |
| |
| Library |
 |
wh::filetypes/detect.whlib |
| |
| Syntax |
 |
PUBLIC RECORD FUNCTION DetectFileType (BLOB filedata,STRING filename) |
| |
| Description |
 |
This function detects the type of the file by analyzing the data of the file. |
| |
| Parameters |
 |
| filedata |
 |
File whose type must be analyzed |
 |
| filename |
 |
If available, name of the file to analyze |
 |
|
| |
| Returns |
 |
Record with file informartion, or a non-existing record if no type was detected |
| |
The record contains the following cells:
| contenttype |
 |
The mime content type of the file |
 |
| imginfo |
 |
A record describing the image, if any. Contains a width & height cell |
 |
| extension |
 |
Usual file extension for this type (does not contain starting dot) |
 |
| title |
 |
Title recorded in file's metadata, if any |
 |
| description |
 |
Description recorded in file's metadata, if any |
 |
|
| |