save_from_file


Description:

public async UserContentFilter save_from_file (string identifier, File file, Cancellable? cancellable = null) throws Error

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 is_native. See save for more details.

When the operation is finished, callback will be invoked, which then can use save.end to obtain the resulting filter.

Parameters:

this

a UserContentFilterStore

identifier

a string used to identify the saved filter

file

a File containing the rule set in JSON format

cancellable

a Cancellable or null to ignore

callback

a TaskReadyCallback to call when saving is completed

user_data

the data to pass to the callback function