Foundry.DirectoryReaper

g Foundry.DirectoryReaper Foundry.DirectoryReaper GObject.Object GObject.Object GObject.Object->Foundry.DirectoryReaper

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_directory (directory, min_age)

add_file (file, min_age)

add_glob (directory, glob, min_age)

execute ()

execute_async (cancellable, callback, *user_data)

execute_finish (result)

execute_sync (cancellable)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

remove-file

The “remove-file” signal is emitted for each file that is removed by the Foundry.DirectoryReaper instance.

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.DirectoryReaper(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Foundry.DirectoryReaperClass

Simplified interface for deleting files or directories recursively.

classmethod new()
Return type:

Foundry.DirectoryReaper

add_directory(directory, min_age)
Parameters:
add_file(file, min_age)
Parameters:
add_glob(directory, glob, min_age)
Parameters:
execute()
Returns:

a Dex.Future that resolves to a boolean.

Return type:

Dex.Future

execute_async(cancellable, callback, *user_data)
Parameters:
execute_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

execute_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) –

Raises:

GLib.Error

Return type:

bool

Signal Details

Foundry.DirectoryReaper.signals.remove_file(directory_reaper, file)
Signal Name:

remove-file

Flags:

RUN_LAST

Parameters:

The “remove-file” signal is emitted for each file that is removed by the Foundry.DirectoryReaper instance. This may be useful if you want to show the user what was processed by the reaper.