gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.Vfs

Description

Entry point for using GIO functionality.

Synopsis

Exported types

newtype Vfs Source #

Memory-managed wrapper type.

Constructors

Vfs (ManagedPtr Vfs) 

Instances

Instances details
Eq Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

(==) :: Vfs -> Vfs -> Bool #

(/=) :: Vfs -> Vfs -> Bool #

GObject Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

ManagedPtrNewtype Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

TypedObject Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

glibType :: IO GType #

HasParentTypes Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

HasAttributeList Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

(info ~ ResolveVfsMethod t Vfs, OverloadedMethod info Vfs p, HasField t Vfs p) => HasField (t :: Symbol) Vfs (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

getField :: Vfs -> p #

(info ~ ResolveVfsMethod t Vfs, OverloadedMethodInfo info Vfs) => IsLabel t (MethodProxy info Vfs) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

fromLabel :: MethodProxy info Vfs #

(info ~ ResolveVfsMethod t Vfs, OverloadedMethod info Vfs p) => IsLabel t (Vfs -> p) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

fromLabel :: Vfs -> p #

IsGValue (Maybe Vfs) Source #

Convert Vfs to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.Vfs

type AttributeList Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

type ParentTypes Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

type SignalList Vfs Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

class (GObject o, IsDescendantOf Vfs o) => IsVfs o Source #

Type class for types which can be safely cast to Vfs, for instance with toVfs.

Instances

Instances details
(GObject o, IsDescendantOf Vfs o) => IsVfs o Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

toVfs :: (MonadIO m, IsVfs o) => o -> m Vfs Source #

Cast to Vfs, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveVfsMethod (t :: Symbol) o where ... Source #

Equations

ResolveVfsMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveVfsMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveVfsMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveVfsMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveVfsMethod "getv" o = ObjectGetvMethodInfo 
ResolveVfsMethod "isActive" o = VfsIsActiveMethodInfo 
ResolveVfsMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveVfsMethod "notify" o = ObjectNotifyMethodInfo 
ResolveVfsMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveVfsMethod "parseName" o = VfsParseNameMethodInfo 
ResolveVfsMethod "ref" o = ObjectRefMethodInfo 
ResolveVfsMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveVfsMethod "registerUriScheme" o = VfsRegisterUriSchemeMethodInfo 
ResolveVfsMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveVfsMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveVfsMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveVfsMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveVfsMethod "unref" o = ObjectUnrefMethodInfo 
ResolveVfsMethod "unregisterUriScheme" o = VfsUnregisterUriSchemeMethodInfo 
ResolveVfsMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveVfsMethod "getData" o = ObjectGetDataMethodInfo 
ResolveVfsMethod "getFileForPath" o = VfsGetFileForPathMethodInfo 
ResolveVfsMethod "getFileForUri" o = VfsGetFileForUriMethodInfo 
ResolveVfsMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveVfsMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveVfsMethod "getSupportedUriSchemes" o = VfsGetSupportedUriSchemesMethodInfo 
ResolveVfsMethod "setData" o = ObjectSetDataMethodInfo 
ResolveVfsMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveVfsMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveVfsMethod l o = MethodResolutionFailed l o :: Type 

getDefault

vfsGetDefault Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Vfs

Returns: a Vfs, which will be the local file system Vfs if no other implementation is available.

Gets the default Vfs for the system.

getFileForPath

data VfsGetFileForPathMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m File), MonadIO m, IsVfs a) => OverloadedMethod VfsGetFileForPathMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo VfsGetFileForPathMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

vfsGetFileForPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: a Vfs.

-> Text

path: a string containing a VFS path.

-> m File

Returns: a File. Free the returned object with objectUnref.

Gets a File for path.

getFileForUri

data VfsGetFileForUriMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m File), MonadIO m, IsVfs a) => OverloadedMethod VfsGetFileForUriMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo VfsGetFileForUriMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

vfsGetFileForUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: atVfs.

-> Text

uri: a string containing a URI

-> m File

Returns: a File. Free the returned object with objectUnref.

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

vfsGetLocal Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Vfs

Returns: a Vfs.

Gets the local Vfs for the system.

getSupportedUriSchemes

data VfsGetSupportedUriSchemesMethodInfo Source #

Instances

Instances details
(signature ~ m [Text], MonadIO m, IsVfs a) => OverloadedMethod VfsGetSupportedUriSchemesMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo VfsGetSupportedUriSchemesMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

vfsGetSupportedUriSchemes Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: a Vfs.

-> m [Text]

Returns: a Nothing-terminated array of strings. The returned array belongs to GIO and must not be freed or modified.

Gets a list of URI schemes supported by vfs.

isActive

data VfsIsActiveMethodInfo Source #

Instances

Instances details
(signature ~ m Bool, MonadIO m, IsVfs a) => OverloadedMethod VfsIsActiveMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo VfsIsActiveMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

vfsIsActive Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: a Vfs.

-> m Bool

Returns: True if construction of the vfs was successful and it is now active.

Checks if the VFS is active.

parseName

data VfsParseNameMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m File), MonadIO m, IsVfs a) => OverloadedMethod VfsParseNameMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo VfsParseNameMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

vfsParseName Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: a Vfs.

-> Text

parseName: a string to be parsed by the VFS module.

-> m File

Returns: a File for the given parseName. Free the returned object with objectUnref.

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

vfsRegisterUriScheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: a Vfs

-> Text

scheme: an URI scheme, e.g. "http"

-> Maybe VfsFileLookupFunc

uriFunc: a VfsFileLookupFunc

-> Maybe VfsFileLookupFunc

parseNameFunc: a VfsFileLookupFunc

-> m Bool

Returns: True if scheme was successfully registered, or False if a handler for scheme already exists.

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

data VfsUnregisterUriSchemeMethodInfo Source #

Instances

Instances details
(signature ~ (Text -> m Bool), MonadIO m, IsVfs a) => OverloadedMethod VfsUnregisterUriSchemeMethodInfo a signature Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

Methods

overloadedMethod :: a -> signature #

OverloadedMethodInfo VfsUnregisterUriSchemeMethodInfo (a :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.Vfs

vfsUnregisterUriScheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsVfs a) 
=> a

vfs: a Vfs

-> Text

scheme: an URI scheme, e.g. "http"

-> m Bool

Returns: True if scheme was successfully unregistered, or False if a handler for scheme does not exist.

Unregisters the URI handler for scheme previously registered with vfsRegisterUriScheme.

Since: 2.50