Skip to content

Fileiteratordelete

flowtask.components.FileIteratorDelete

FileIteratorDelete

FileIteratorDelete(loop=None, job=None, stat=None, **kwargs)

Bases: IteratorBase

FileIteratorDelete

Overview

The FileIteratorDelete class is a component for removing all files in a specified directory. It extends the
IteratorBase class and provides methods for directory validation, file listing based on patterns, and file deletion.

.. table:: Properties :widths: auto

+------------------+----------+--------------------------------------------------------------------------------------------------+
| Name             | Required | Description                                                                                      |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| directory        |   Yes    | The directory from which files will be deleted.                                                  |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| _filenames       |   No     | A list to store filenames that match the pattern.                                                |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| _path            |   No     | The Path object for the directory.                                                               |
+------------------+----------+--------------------------------------------------------------------------------------------------+
| pattern          |   No     | The pattern to match files for deletion.                                                         |
+------------------+----------+--------------------------------------------------------------------------------------------------+

Return

The methods in this class manage the deletion of files in a specified directory, including initialization, file listing,
and deletion.

start async

start(**kwargs)

Check if Directory exists.