Skip to content

delete

Bases: FileOperation, FileRemoverMixin

Delete files that match the pattern

Source code in file_operations/delete.py
 8
 9
10
11
12
13
14
15
16
17
class DeleteOperation(FileOperation, FileRemoverMixin):
    """Delete files that match the pattern"""
    @staticmethod
    def add_arguments(settings: AppSettings, parser: argparse.ArgumentParser) -> None:
        """this class doesn't have unique arguments"""
        pass

    def do_task(self):
        """Delete files that match the pattern"""
        self._remove_all(self.files_for_task)

add_arguments(settings, parser) staticmethod

this class doesn't have unique arguments

Source code in file_operations/delete.py
10
11
12
13
@staticmethod
def add_arguments(settings: AppSettings, parser: argparse.ArgumentParser) -> None:
    """this class doesn't have unique arguments"""
    pass

do_task()

Delete files that match the pattern

Source code in file_operations/delete.py
15
16
17
def do_task(self):
    """Delete files that match the pattern"""
    self._remove_all(self.files_for_task)