Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-73621

Refactor various recursive directory delete functions into one and make it much faster

XMLWordPrintable

      While testing MDL-69088 we found that there are a bunch of functions that do more or less the same thing:

      lib/filelib.php fulldelete()

      lib/moodlelib.php remove_dir()

      backup/cc/cc_lib/gral_lib/pathutils.php:403:function rmdirr($dirname)

      There are all also very slow at scale because they process all the files recursively directly in php.

      I'm proposing:

      a) pick one and refactor the others to just call it, and deprecate them

      b) In a similar way to pathtodu have an option to use a cli variant which unlinks the directory outside of php land which should be more or less instant.

            Unassigned Unassigned
            brendanheywood Brendan Heywood
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.