gi-gio-2.0.12: Gio bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.Vfs

Contents

Description

Entry point for using GIO functionality.

Synopsis

Exported types

newtype Vfs Source #

Constructors

Vfs (ManagedPtr Vfs) 

Instances

GObject Vfs Source # 

Methods

gobjectType :: Vfs -> IO GType #

IsObject Vfs Source # 
IsVfs Vfs Source # 
((~) * info (ResolveVfsMethod t Vfs), MethodInfo * info Vfs p) => IsLabel t (Vfs -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Vfs -> p #

((~) * info (ResolveVfsMethod t Vfs), MethodInfo * info Vfs p) => IsLabelProxy t (Vfs -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Vfs -> p #

HasAttributeList * Vfs Source # 
type AttributeList Vfs Source # 
type SignalList Vfs Source # 

toVfs :: IsVfs o => o -> IO Vfs Source #

Methods

getDefault

vfsGetDefault Source #

Arguments

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

Returns: a Vfs.

Gets the default Vfs for the system.

getFileForPath

data VfsGetFileForPathMethodInfo Source #

Instances

((~) * signature (Text -> m File), MonadIO m, IsVfs a) => MethodInfo * VfsGetFileForPathMethodInfo a signature Source # 

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

((~) * signature (Text -> m File), MonadIO m, IsVfs a) => MethodInfo * VfsGetFileForUriMethodInfo a signature Source # 

vfsGetFileForUri Source #

Arguments

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

vfs: aVfs.

-> 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

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

((~) * signature (m Bool), MonadIO m, IsVfs a) => MethodInfo * VfsIsActiveMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy VfsIsActiveMethodInfo a -> signature -> s #

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

((~) * signature (Text -> m File), MonadIO m, IsVfs a) => MethodInfo * VfsParseNameMethodInfo a signature Source # 

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

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