|
System.Gnome.VFS.MIME | Maintainer | gtk2hs-devel@lists.sourceforge.net
Stability : alpha
Portability : portable (depends on GHC) |
|
|
|
|
|
Description |
|
|
Synopsis |
|
|
|
|
Types
|
|
type MIMEType = String |
A string that will be treated as a MIME-type.
|
|
MIME Type Operations
|
|
mimeTypeFromNameOrDefault |
:: FilePath | filename - the file
to get the MIME-type
for
| -> Maybe MIMEType | defaultv - the
default MIME-type to
return if no match is
found
| -> Maybe MIMEType | the MIME-type of the
filename, or defaultv
| Try to determine the MIME-type of the file at filename, using
only the filename and the Gnome VFS MIME type database. If the
MIME-type is not found, return defaultv.
|
|
|
getMIMETypeCommon |
:: URI | uri - the URI of the file to examine
| -> IO String | the guessed MIME-type
| Try to get the MIME-type of the file represented by uri. This
function favors the contents of the file over the extension of
the filename. If the file does not exist, the MIME-type for the
extension is returned. If no MIME-type can be found for the file,
the function returns "application/octet-stream".
Note: This function will not necessarily return the same
MIME-type as getFileInfo.
|
|
|
getMIMETypeFromURI |
:: URI | uri - the URI to examine
| -> IO String | the guessed MIME-type
| Try to get the MIME-type of the file represented by uri. This
function looks only at the filename pointed to by uri.
|
|
|
getFileMIMETypeFast |
|
|
getFileMIMEType :: FilePath -> Bool -> IO String |
Try to guess the MIME-type of the file represented by path. If
suffixOnly is False, use the MIME-magic based lookup
first. Handles non-existant files by returning a type based on
the file extension.
|
|
mimeTypeIsSupertype :: String -> Bool |
Returns True if mimeType is of the form foo/*, and False
otherwise.
|
|
getSupertypeFromMIMEType :: String -> String |
Returns the supertype for mimeType. The supertype of an
application is computed by removing its suffix, and replacing it
with *. Thus, foo/bar will be converted to foo/*.
|
|
mimeInfoCacheReload :: FilePath -> IO () |
Reload the MIME information for the specified directory.
|
|
Produced by Haddock version 0.8 |