|
| System.Gnome.VFS.MIME | | Portability | portable (depends on GHC) | | Stability | alpha | | Maintainer | gtk2hs-devel@lists.sourceforge.net |
|
|
|
|
|
| Description |
|
|
| Synopsis |
|
|
|
|
| Types
|
|
|
| A string that will be treated as a MIME-type.
|
|
| MIME Type Operations
|
|
| mimeTypeFromNameOrDefault | Source |
|
| :: 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.
|
|
|
|
| :: 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 System.Gnome.VFS.Ops.getFileInfo.
|
|
|
|
| :: 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.
|
|
|
|
|
|
|
| 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.
|
|
|
| Returns True if mimeType is of the form foo/*, and False
otherwise.
|
|
|
| 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/*.
|
|
|
| Reload the MIME information for the specified directory.
|
|
| Produced by Haddock version 2.6.0 |