Sitemap Sitemap  |  Contact Us Contact Us  |  Clients Clients
   DetectFileType
  Home |  WebHare Lite |  Downloads |  HareScript |  Websites/CMS |  Applications
Search for:  in: 
HareScript
File types libraries
 
Archive files (tar.gz and zip)
CSV im/export
File analysis
HareScript Library processing
HTML reprocessing library
WebHare record files
XML parser library
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
 
 
In library 'detect'
DetectFileType
 
Top To top of page