Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Entry point for using GIO functionality.
Synopsis
- newtype Vfs = Vfs (ManagedPtr Vfs)
- class (GObject o, IsDescendantOf Vfs o) => IsVfs o
- toVfs :: (MonadIO m, IsVfs o) => o -> m Vfs
- vfsGetDefault :: (HasCallStack, MonadIO m) => m Vfs
- vfsGetFileForPath :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File
- vfsGetFileForUri :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File
- vfsGetLocal :: (HasCallStack, MonadIO m) => m Vfs
- vfsGetSupportedUriSchemes :: (HasCallStack, MonadIO m, IsVfs a) => a -> m [Text]
- vfsIsActive :: (HasCallStack, MonadIO m, IsVfs a) => a -> m Bool
- vfsParseName :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m File
- vfsRegisterUriScheme :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> Maybe VfsFileLookupFunc -> Maybe VfsFileLookupFunc -> m Bool
- vfsUnregisterUriScheme :: (HasCallStack, MonadIO m, IsVfs a) => a -> Text -> m Bool
Exported types
Memory-managed wrapper type.
Vfs (ManagedPtr Vfs) |
Instances
Eq Vfs Source # | |
GObject Vfs Source # | |
Defined in GI.Gio.Objects.Vfs | |
ManagedPtrNewtype Vfs Source # | |
Defined in GI.Gio.Objects.Vfs toManagedPtr :: Vfs -> ManagedPtr Vfs # | |
TypedObject Vfs Source # | |
Defined in GI.Gio.Objects.Vfs | |
HasParentTypes Vfs Source # | |
Defined in GI.Gio.Objects.Vfs | |
IsGValue (Maybe Vfs) Source # | Convert |
Defined in GI.Gio.Objects.Vfs | |
type ParentTypes Vfs Source # | |
Defined in GI.Gio.Objects.Vfs |
class (GObject o, IsDescendantOf Vfs o) => IsVfs o Source #
Instances
(GObject o, IsDescendantOf Vfs o) => IsVfs o Source # | |
Defined in GI.Gio.Objects.Vfs |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isActive, isFloating, notify, notifyByPspec, parseName, ref, refSink, registerUriScheme, runDispose, stealData, stealQdata, thawNotify, unref, unregisterUriScheme, watchClosure.
Getters
getData, getFileForPath, getFileForUri, getProperty, getQdata, getSupportedUriSchemes.
Setters
getDefault
:: (HasCallStack, MonadIO m) | |
=> m Vfs | Returns: a |
Gets the default Vfs
for the system.
getFileForPath
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> Text |
|
-> m File | Returns: a |
Gets a File
for path
.
getFileForUri
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> Text |
|
-> m File | Returns: a |
Gets a File
for uri
.
This operation never fails, but the returned object might not support any I/O operation if the URI is malformed or if the URI scheme is not supported.
getLocal
:: (HasCallStack, MonadIO m) | |
=> m Vfs | Returns: a |
Gets the local Vfs
for the system.
getSupportedUriSchemes
vfsGetSupportedUriSchemes Source #
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> m [Text] | Returns: a |
Gets a list of URI schemes supported by vfs
.
isActive
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> m Bool | Returns: |
Checks if the VFS is active.
parseName
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> Text |
|
-> m File | Returns: a |
This operation never fails, but the returned object might
not support any I/O operations if the parseName
cannot
be parsed by the Vfs
module.
registerUriScheme
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> Text |
|
-> Maybe VfsFileLookupFunc |
|
-> Maybe VfsFileLookupFunc |
|
-> m Bool | Returns: |
Registers uriFunc
and parseNameFunc
as the File
URI and parse name
lookup functions for URIs with a scheme matching scheme
.
Note that scheme
is registered only within the running application, as
opposed to desktop-wide as it happens with GVfs backends.
When a File
is requested with an URI containing scheme
(e.g. through
fileNewForUri
), uriFunc
will be called to allow a custom
constructor. The implementation of uriFunc
should not be blocking, and
must not call vfsRegisterUriScheme
or vfsUnregisterUriScheme
.
When fileParseName
is called with a parse name obtained from such file,
parseNameFunc
will be called to allow the File
to be created again. In
that case, it's responsibility of parseNameFunc
to make sure the parse
name matches what the custom File
implementation returned when
fileGetParseName
was previously called. The implementation of
parseNameFunc
should not be blocking, and must not call
vfsRegisterUriScheme
or vfsUnregisterUriScheme
.
It's an error to call this function twice with the same scheme. To unregister
a custom URI scheme, use vfsUnregisterUriScheme
.
Since: 2.50
unregisterUriScheme
vfsUnregisterUriScheme Source #
:: (HasCallStack, MonadIO m, IsVfs a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Unregisters the URI handler for scheme
previously registered with
vfsRegisterUriScheme
.
Since: 2.50