BBjFileSystem::getMimeType

Description

In BBj 17.0 and higher, this method returns the detected MIME type for the specified filename.

Syntax

Return Value

Method

string

getMimeType(string filename)

Parameters

Variable

Description

filename

Specifies the name of the file.

Return Value

Returns the detected MIME type for the specified filename.

Remarks

The MIME type is detected using Apache Tika.

Example

rem ' getMimeType.txt

filename$ = pgm(-2)
mime$ = bbjapi().getFileSystem().getMimeType(filename$)
print "MIME type of ",filename$," is: ",mime$

See Also

BBjAPI

BBjFileSystem

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.