Get the type of Multi-Purpose Internet Mail Extension (MIME) of a file.

1 file.getMimeType

<file.getMimeType>
    <file /> !
</file.getMimeType>
Example

Get the type of MIME of the file.

Copy
<xsql-script name='file_getMimeType_sample1'>
    <body>
        <set name='m_path'>
            <string>c:<file.separator />tmp<file.separator />source<file.separator />deister.txt</string>
        </set>
        <println trim='true'>
            The type MIME of <string.space /><m_path/><string.space />is<string.space />
            <file.getMimeType>
                <file name='#m_path' type='absolute' />
            </file.getMimeType>
        </println>
    </body>
</xsql-script>

The type MIME of c:\tmp\source\deister.txt is application/octet-stream