Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SixFile Functions (continued)

MIMEOpen Function

Overview

The MIMEOpen function opens a MIME encoded file or string to allow information to be retrieved. [or added.]

Syntax/Parameters

Syntax

handle = MIMEOpen ( string data );

Parameters

data

A string containing a filename and path, URI or a the complete MIME message. If the parameter is a file, it will remain locked until the MIME Object is closed.

Return Value

Returns a handle to the MIME Object or NULL_HANDLE on failure. Use the GetLastError function to retrieve error information.

File errors will be returned if the file cannot be accessed. An ERROR_SYNTAX with a syntax error code will be returned if there is a problem with the content of the MIME file.

Remarks

The returned object handle is used to access the data within the MIME Object. On execution, the MIMEOpen function reads named parameters, indexes the file and creates a entry list for each data component. Depending on the generating software, entries may contain partial paths and folders may also appear in the list.

Prior to processing, the MIMEOpen function looks in the data parameter for a line return. If it contains one or more return characters (either return or new line, 0x0D and 0x0A respectively), it is assumed to an encoded string. Otherwise it is assumed to be a qualified file name.

Once opened the content can be examined with the file and property functions.

Note that if an email header is opened, form example as retrieved by POPGetMessageHeader, the object will not contain any files.

Use the CloseHandle function to release the object.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic