1.103 <GVfs>

Class: <GVfs>

It derives from <GObject>.

Entry point for using GIO functionality.

Fields

parent-instance

Procedures

Procedure: vfs:get-default ⇒ %return

Gets the default <GVfs> for the system.

%return

Returned: a <GVfs>.

a <GVfs>, which will be the local file system <GVfs> if no other implementation is available.

Method: vfs:get-file-for-path self path ⇒ %return
Method: get-file-for-path self path ⇒ %return

Gets a <GFile> for path.

self

Passed: a <GVfs>.

a <GVfs>.

path

Passed: a file name, as a string.

a string containing a VFS path.

%return

Returned: a <GFile>.

a <GFile>. Free the returned object with object:unref.

Method: vfs:get-file-for-uri self uri ⇒ %return
Method: get-file-for-uri self uri ⇒ %return

Gets a <GFile> 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.

self

Passed: a <GVfs>.

a#GVfs.

uri

Passed: a string.

a string containing a URI

%return

Returned: a <GFile>.

a <GFile>. Free the returned object with object:unref.

Procedure: vfs:get-local ⇒ %return

Gets the local <GVfs> for the system.

%return

Returned: a <GVfs>.

a <GVfs>.

Method: vfs:get-supported-uri-schemes self ⇒ %return
Method: get-supported-uri-schemes self ⇒ %return

Gets a list of URI schemes supported by self.

self

Passed: a <GVfs>.

a <GVfs>.

%return

Returned: a vector, each a string.

a #f-terminated array of strings. The returned array belongs to GIO and must not be freed or modified.

Method: vfs:is-active? self ⇒ %return
Method: is-active? self ⇒ %return

Checks if the VFS is active.

self

Passed: a <GVfs>.

a <GVfs>.

%return

Returned: a boolean.

#t if construction of the self was successful and it is now active.

Method: vfs:parse-name self parse-name ⇒ %return
Method: parse-name self parse-name ⇒ %return

This operation never fails, but the returned object might not support any I/O operations if the parse-name cannot be parsed by the <GVfs> module.

self

Passed: a <GVfs>.

a <GVfs>.

parse-name

Passed: a string.

a string to be parsed by the VFS module.

%return

Returned: a <GFile>.

a <GFile> for the given parse-name. Free the returned object with object:unref.

Method: vfs:register-uri-scheme? self scheme [uri-func] [parse-name-func] ⇒ %return
Method: register-uri-scheme? self scheme [uri-func] [parse-name-func] ⇒ %return

Registers uri-func and parse-name-func as the <GFile> 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 <GFile> is requested with an URI containing scheme (e.g. through file-new-for-uri), uri-func will be called to allow a custom constructor. The implementation of uri-func should not be blocking, and must not call vfs:register-uri-scheme? or vfs:unregister-uri-scheme?.

When file-parse-name is called with a parse name obtained from such file, parse-name-func will be called to allow the <GFile> to be created again. In that case, it’s responsibility of parse-name-func to make sure the parse name matches what the custom <GFile> implementation returned when file:get-parse-name was previously called. The implementation of parse-name-func should not be blocking, and must not call vfs:register-uri-scheme? or vfs:unregister-uri-scheme?.

It’s an error to call this function twice with the same scheme. To unregister a custom URI scheme, use vfs:unregister-uri-scheme?.

self

Passed: a <GVfs>.

a <GVfs>

scheme

Passed: a string.

an URI scheme, e.g. "http"

uri-func

Passed, or left out: a procedure, or #f.

a GVfsFileLookupFunc

See GVfsFileLookupFunc for how it is called.

parse-name-func

Passed, or left out: a procedure, or #f.

a GVfsFileLookupFunc

See GVfsFileLookupFunc for how it is called.

%return

Returned: a boolean.

#t if scheme was successfully registered, or #f if a handler for scheme already exists.

uri-data

Not passed: guile-gi supplies it.

custom data passed to be passed to uri-func, or #f

uri-destroy

Not passed: guile-gi supplies it.

function to be called when unregistering the URI scheme, or when self is disposed, to free the resources used by the URI lookup function

See GDestroyNotify for how it is called.

parse-name-data

Not passed: guile-gi supplies it.

custom data passed to be passed to parse-name-func, or #f

parse-name-destroy

Not passed: guile-gi supplies it.

function to be called when unregistering the URI scheme, or when self is disposed, to free the resources used by the parse name lookup function

See GDestroyNotify for how it is called.

Method: vfs:unregister-uri-scheme? self scheme ⇒ %return
Method: unregister-uri-scheme? self scheme ⇒ %return

Unregisters the URI handler for scheme previously registered with vfs:register-uri-scheme?.

self

Passed: a <GVfs>.

a <GVfs>

scheme

Passed: a string.

an URI scheme, e.g. "http"

%return

Returned: a boolean.

#t if scheme was successfully unregistered, or #f if a handler for scheme does not exist.

Virtual methods

Virtual method: vfs:do-add-writable-namespaces implementor self list

To override it in a new class, give register-type #:vfuncs `((add-writable-namespaces . ,procedure)). The procedure is called as (procedure self list).

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

list

Passed: a <GFileAttributeInfoList>.

Virtual method: vfs:do-get-file-for-path implementor self path ⇒ %return

Gets a <GFile> for path.

To override it in a new class, give register-type #:vfuncs `((get-file-for-path . ,procedure)). The procedure is called as (procedure self path) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

a <GVfs>.

path

Passed: a file name, as a string.

a string containing a VFS path.

%return

Returned: a <GFile>.

a <GFile>. Free the returned object with object:unref.

Virtual method: vfs:do-get-file-for-uri implementor self uri ⇒ %return

Gets a <GFile> 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.

To override it in a new class, give register-type #:vfuncs `((get-file-for-uri . ,procedure)). The procedure is called as (procedure self uri) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

a#GVfs.

uri

Passed: a string.

a string containing a URI

%return

Returned: a <GFile>.

a <GFile>. Free the returned object with object:unref.

Virtual method: vfs:do-get-supported-uri-schemes implementor self ⇒ %return

Gets a list of URI schemes supported by self.

To override it in a new class, give register-type #:vfuncs `((get-supported-uri-schemes . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

a <GVfs>.

%return

Returned: a vector, each a string.

a #f-terminated array of strings. The returned array belongs to GIO and must not be freed or modified.

Virtual method: vfs:do-is-active implementor self ⇒ %return

Checks if the VFS is active.

To override it in a new class, give register-type #:vfuncs `((is-active . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

a <GVfs>.

%return

Returned: a boolean.

#t if construction of the self was successful and it is now active.

Virtual method: vfs:do-local-file-add-info implementor self filename device attribute-matcher info cancellable extra-data free-extra-data

To override it in a new class, give register-type #:vfuncs `((local-file-add-info . ,procedure)). The procedure is called as (procedure self filename device attribute-matcher info cancellable extra-data free-extra-data).

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

filename

Passed: a string.

device

Passed: an unsigned 64-bit integer.

attribute-matcher

Passed: a <GFileAttributeMatcher>.

info

Passed: a <GFileInfo>.

cancellable

Passed: a <GCancellable>, or #f.

extra-data

Passed: a foreign pointer, or a bytevector, or #f.

free-extra-data

Passed: a procedure.

See GDestroyNotify for how it is called.

Virtual method: vfs:do-local-file-moved implementor self source dest

To override it in a new class, give register-type #:vfuncs `((local-file-moved . ,procedure)). The procedure is called as (procedure self source dest).

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

source

Passed: a string.

dest

Passed: a string.

Virtual method: vfs:do-local-file-removed implementor self filename

To override it in a new class, give register-type #:vfuncs `((local-file-removed . ,procedure)). The procedure is called as (procedure self filename).

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

filename

Passed: a string.

Virtual method: vfs:do-local-file-set-attributes implementor self filename info flags [cancellable] ⇒ %return

To override it in a new class, give register-type #:vfuncs `((local-file-set-attributes . ,procedure)). The procedure is called as (procedure self filename info flags cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

filename

Passed: a string.

info

Passed: a <GFileInfo>.

flags

Passed: a <GFileQueryInfoFlags>, or a list of its symbols, or one of them.

cancellable

Passed, or left out: a <GCancellable>, or #f.

%return

Returned: a boolean.

Virtual method: vfs:do-parse-name implementor self parse-name ⇒ %return

This operation never fails, but the returned object might not support any I/O operations if the parse-name cannot be parsed by the <GVfs> module.

To override it in a new class, give register-type #:vfuncs `((parse-name . ,procedure)). The procedure is called as (procedure self parse-name) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GVfs>, or a class that derives from it, or its GType number.

self

Passed: a <GVfs>.

a <GVfs>.

parse-name

Passed: a string.

a string to be parsed by the VFS module.

%return

Returned: a <GFile>.

a <GFile> for the given parse-name. Free the returned object with object:unref.