UserContentFilterStore.saveFromFile

Asynchronously save a content filter from the contents of a file.

Asynchronously save a content filter from the contents of a file, which must be native to the platform, as checked by gio.file.File.isNative. See webkit.user_content_filter_store.UserContentFilterStore.save for more details.

When the operation is finished, callback will be invoked, which then can use webkit.user_content_filter_store.UserContentFilterStore.saveFinish to obtain the resulting filter.

class UserContentFilterStore
void
saveFromFile

Parameters

identifier string

a string used to identify the saved filter

file gio.file.File

a #GFile containing the rule set in JSON format

cancellable gio.cancellable.Cancellable

a #GCancellable or null to ignore

callback gio.types.AsyncReadyCallback

a #GAsyncReadyCallback to call when saving is completed