當前位置: 首頁>>代碼示例>>PHP>>正文


PHP backup_helper::delete_old_backup_dirs方法代碼示例

本文整理匯總了PHP中backup_helper::delete_old_backup_dirs方法的典型用法代碼示例。如果您正苦於以下問題:PHP backup_helper::delete_old_backup_dirs方法的具體用法?PHP backup_helper::delete_old_backup_dirs怎麽用?PHP backup_helper::delete_old_backup_dirs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在backup_helper的用法示例。


在下文中一共展示了backup_helper::delete_old_backup_dirs方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: define_execution

 protected function define_execution() {
     global $CFG;
     restore_controller_dbops::drop_restore_temp_tables($this->get_restoreid()); // Drop ids temp table
     backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60));              // Delete > 4 hours temp dirs
     if (empty($CFG->keeptempdirectoriesonbackup)) { // Conditionally
         backup_helper::delete_backup_dir($this->task->get_tempdir()); // Empty restore dir
     }
 }
開發者ID:nottmoo,項目名稱:moodle,代碼行數:8,代碼來源:restore_stepslib.php

示例2: define_execution

    protected function define_execution() {
        global $CFG;

        backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
        backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60));              // Delete > 4 hours temp dirs
        // Delete temp dir conditionally:
        // 1) If $CFG->keeptempdirectoriesonbackup is not enabled
        // 2) If backup temp dir deletion has been marked to be avoided
        if (empty($CFG->keeptempdirectoriesonbackup) && !$this->skipcleaningtempdir) {
            backup_helper::delete_backup_dir($this->get_backupid()); // Empty backup dir
        }
    }
開發者ID:nuckey,項目名稱:moodle,代碼行數:12,代碼來源:backup_stepslib.php

示例3: define_execution

    protected function define_execution() {
        global $CFG;

        backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
        backup_helper::delete_old_backup_dirs(strtotime('-1 week'));                // Delete > 1 week old temp dirs.
        // Delete temp dir conditionally:
        // 1) If $CFG->keeptempdirectoriesonbackup is not enabled
        // 2) If backup temp dir deletion has been marked to be avoided
        if (empty($CFG->keeptempdirectoriesonbackup) && !$this->skipcleaningtempdir) {
            $progress = $this->task->get_progress();
            $progress->start_progress('Deleting backup dir');
            backup_helper::delete_backup_dir($this->get_backupid(), $progress); // Empty backup dir
            $progress->end_progress();
        }
    }
開發者ID:narasimhaeabyas,項目名稱:tataaiapro,代碼行數:15,代碼來源:backup_stepslib.php

示例4: define_execution

 protected function define_execution()
 {
     global $CFG;
     restore_controller_dbops::drop_restore_temp_tables($this->get_restoreid());
     // Drop ids temp table
     $progress = $this->task->get_progress();
     $progress->start_progress('Deleting backup dir');
     backup_helper::delete_old_backup_dirs(strtotime('-1 week'), $progress);
     // Delete > 1 week old temp dirs.
     if (empty($CFG->keeptempdirectoriesonbackup)) {
         // Conditionally
         backup_helper::delete_backup_dir($this->task->get_tempdir(), $progress);
         // Empty restore dir
     }
     $progress->end_progress();
 }
開發者ID:Jinelle,項目名稱:moodle,代碼行數:16,代碼來源:restore_stepslib.php


注:本文中的backup_helper::delete_old_backup_dirs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。