original_string: static public function delete_old_backup_dirs($deletefrom, \core\progress\base $progress = null) {
          $status = true;
          // Get files and directories in the backup temp dir without descend.
          $backuptempdir = make_backup_temp_directory('');
          $list = get_directory_list($backuptempdir, '', false, true, true);
          foreach ($list as $file) {
              $file_path = $backuptempdir . '/' . $file;
              $moddate = filemtime($file_path);
              if ($status && $moddate < $deletefrom) {
                  //If directory, recurse
                  if (is_dir($file_path)) {
                      // $file is really the backupid
                      $status = self::delete_backup_dir($file, $progress);
                  //If file
                  } else {
                      unlink($file_path);
                  }
              }
          }
          if (!$status) {
              throw new backup_helper_exception('problem_deleting_old_backup_temp_dirs');
          }
      }
code: static public function delete_old_backup_dirs($deletefrom, \core\progress\base $progress = null) {
          $status = true;
          // Get files and directories in the backup temp dir without descend.
          $backuptempdir = make_backup_temp_directory('');
          $list = get_directory_list($backuptempdir, '', false, true, true);
          foreach ($list as $file) {
              $file_path = $backuptempdir . '/' . $file;
              $moddate = filemtime($file_path);
              if ($status && $moddate < $deletefrom) {
                  //If directory, recurse
                  if (is_dir($file_path)) {
                      // $file is really the backupid
                      $status = self::delete_backup_dir($file, $progress);
                  //If file
                  } else {
                      unlink($file_path);
                  }
              }
          }
          if (!$status) {
              throw new backup_helper_exception('problem_deleting_old_backup_temp_dirs');
          }
      }
code_tokens: static public function delete_old_backup_dirs ( $ deletefrom , \ core \ progress \ base $ progress = null ) { $ status = true ; // Get files and directories in the backup temp dir without descend. $ backuptempdir = make_backup_temp_directory ( '' ) ; $ list = get_directory_list ( $ backuptempdir , '' , false , true , true ) ; foreach ( $ list as $ file ) { $ file_path = $ backuptempdir . '/' . $ file ; $ moddate = filemtime ( $ file_path ) ; if ( $ status && $ moddate < $ deletefrom ) { //If directory, recurse if ( is_dir ( $ file_path ) ) { // $file is really the backupid $ status = self :: delete_backup_dir ( $ file , $ progress ) ; //If file } else { unlink ( $ file_path ) ; } } } if ( ! $ status ) { throw new backup_helper_exception ( 'problem_deleting_old_backup_temp_dirs' ) ; } }
docstring: Delete all the temp dirs older than the time specified.
  
  If supplied, progress object should be ready to receive indeterminate
  progress reports.
  
  @param int $deletefrom Time to delete from
  @param \core\progress\base $progress Optional progress reporting object
docstring_tokens: Delete all the temp dirs older than the time specified .