当前位置: 首页>>代码示例>>PHP>>正文


PHP hmbkp_rmdirtree函数代码示例

本文整理汇总了PHP中hmbkp_rmdirtree函数的典型用法代码示例。如果您正苦于以下问题:PHP hmbkp_rmdirtree函数的具体用法?PHP hmbkp_rmdirtree怎么用?PHP hmbkp_rmdirtree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了hmbkp_rmdirtree函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  */
 public function tearDown()
 {
     // Remove all backup paths that exist
     foreach ($this->path->get_existing_paths() as $path) {
         hmbkp_rmdirtree($path);
     }
 }
开发者ID:rolka,项目名称:backupwordpress,代码行数:12,代码来源:testFullBackupTest.php

示例2: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  * @access public
  */
 public function tearDown()
 {
     hmbkp_rmdirtree(hmbkp_path());
     delete_option('hmbkp_path');
     delete_option('hmbkp_default_path');
     unset($this->backup);
 }
开发者ID:leewillis77,项目名称:backupwordpress,代码行数:13,代码来源:testFullBackupTest.php

示例3: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  */
 public function tearDown()
 {
     hmbkp_rmdirtree(hmbkp_path());
     chmod($this->backup->get_root() . '/test-data.txt', 0664);
     unset($this->backup);
     HM\BackUpWordPress\Path::get_instance()->reset_path();
 }
开发者ID:rolka,项目名称:backupwordpress,代码行数:12,代码来源:testUnreadableFileTest.php

示例4: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  */
 public function tearDown()
 {
     hmbkp_rmdirtree(hmbkp_path());
     unset($this->backup);
     if (file_exists($this->symlink)) {
         unlink($this->symlink);
     }
     HM\BackUpWordPress\Path::get_instance()->reset_path();
 }
开发者ID:rjagadishsingh,项目名称:backupwordpress,代码行数:14,代码来源:testSymlinkDirTest.php

示例5: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  * @access public
  */
 public function tearDown()
 {
     hmbkp_rmdirtree($this->backup->get_path());
     hmbkp_rmdirtree(hmbkp_path());
     delete_option('hmbkp_path');
     delete_option('hmbkp_default_path');
     chmod($this->backup->get_root() . '/test-data.txt', 0664);
     unset($this->backup);
 }
开发者ID:humanmade,项目名称:hm-backup,代码行数:15,代码来源:testUnreadableFileTest.php

示例6: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  */
 public function tearDown()
 {
     if (!function_exists('symlink')) {
         return;
     }
     hmbkp_rmdirtree(hmbkp_path());
     unset($this->backup);
     @unlink($this->symlink);
     HM\BackUpWordPress\Path::get_instance()->reset_path();
 }
开发者ID:rjagadishsingh,项目名称:backupwordpress,代码行数:15,代码来源:testBrokenSymlinkTest.php

示例7: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  * @access public
  */
 public function tearDown()
 {
     hmbkp_rmdirtree($this->backup->get_path());
     hmbkp_rmdirtree(hmbkp_path());
     delete_option('hmbkp_path');
     delete_option('hmbkp_default_path');
     unset($this->backup);
     if (file_exists($this->hidden)) {
         unlink($this->hidden);
     }
 }
开发者ID:humanmade,项目名称:hm-backup,代码行数:17,代码来源:testHiddenFileTest.php

示例8: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  * @access public
  */
 public function tearDown()
 {
     if (file_exists($this->custom_path)) {
         chmod($this->custom_path, 0755);
     }
     hmbkp_rmdirtree($this->custom_path);
     hmbkp_rmdirtree(hmbkp_path());
     hmbkp_rmdirtree(hmbkp_path_default());
     delete_option('hmbkp_path');
     delete_option('hmbkp_default_path');
     unset($this->backup);
 }
开发者ID:leewillis77,项目名称:backupwordpress,代码行数:18,代码来源:testMoveBackupPathTest.php

示例9: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  * @access public
  */
 public function tearDown()
 {
     if (!function_exists('symlink')) {
         return;
     }
     hmbkp_rmdirtree($this->backup->get_path());
     hmbkp_rmdirtree(hmbkp_path());
     delete_option('hmbkp_path');
     delete_option('hmbkp_default_path');
     unset($this->backup);
     @unlink($this->symlink);
 }
开发者ID:humanmade,项目名称:hm-backup,代码行数:18,代码来源:testBrokenSymlinkTest.php

示例10: tearDown

 public function tearDown()
 {
     // Restore the is_apache global in-case it was messed with in the test
     global $is_apache;
     if (isset($this->is_apache)) {
         $is_apache = $this->is_apache;
     }
     // Remove all backup paths that exist
     foreach ($this->path->get_existing_paths() as $path) {
         hmbkp_rmdirtree($path);
     }
     // Remove our custom path
     hmbkp_rmdirtree($this->custom_path);
 }
开发者ID:rjagadishsingh,项目名称:backupwordpress,代码行数:14,代码来源:testBackupPath.php

示例11: move_old_backups

 /**
  * Move backup files from an existing directory and the new
  * location
  *
  * @param string $path 	The path to move the backups from
  * @return void
  */
 public function move_old_backups($from)
 {
     if (!is_readable($from)) {
         return;
     }
     if (!wp_is_writable($this->get_path())) {
         return;
     }
     // Move any existing backups
     if ($handle = opendir($from)) {
         // Loop through the backup directory
         while (false !== ($file = readdir($handle))) {
             // Find all zips
             if ('zip' === pathinfo($file, PATHINFO_EXTENSION)) {
                 // Try to move them
                 if (!@rename(trailingslashit($from) . $file, trailingslashit($this->get_path()) . $file)) {
                     // If we can't move them then try to copy them
                     copy(trailingslashit($from) . $file, trailingslashit($this->get_path()) . $file);
                 }
             }
         }
         closedir($handle);
     }
     // Delete the old directory if it's inside WP_CONTENT_DIR
     if (false !== strpos($from, WP_CONTENT_DIR) && $from !== $this->get_path()) {
         hmbkp_rmdirtree($from);
     }
 }
开发者ID:Natedaug,项目名称:WordPressSites,代码行数:35,代码来源:class-hmbkp-path.php

示例12: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  *
  */
 public function tearDown()
 {
     hmbkp_rmdirtree(hmbkp_path());
     unset($this->backup);
     HM\BackUpWordPress\Path::get_instance()->reset_path();
 }
开发者ID:rjagadishsingh,项目名称:backupwordpress,代码行数:11,代码来源:testDatabaseDumpTest.php

示例13: hmbkp_cleanup

/**
 * Remove any non backup.zip files from the backups dir.
 *
 * @return void
 */
function hmbkp_cleanup()
{
    if (defined('HMBKP_PATH') && HMBKP_PATH) {
        return;
    }
    $hmbkp_path = hmbkp_path();
    if (!is_dir($hmbkp_path)) {
        return;
    }
    if ($handle = opendir($hmbkp_path)) {
        while (false !== ($file = readdir($handle))) {
            if (!in_array($file, array('.', '..', 'index.html')) && pathinfo($file, PATHINFO_EXTENSION) !== 'zip') {
                hmbkp_rmdirtree(trailingslashit($hmbkp_path) . $file);
            }
        }
        closedir($handle);
    }
}
开发者ID:shahadat014,项目名称:geleyi,代码行数:23,代码来源:core.php

示例14: define

<?php

if (!defined('HMBKP_PLUGIN_PATH')) {
    define('HMBKP_PLUGIN_PATH', plugin_dir_path(__FILE__));
}
// Load the schedules
require_once HMBKP_PLUGIN_PATH . 'hm-backup/hm-backup.php';
require_once HMBKP_PLUGIN_PATH . 'classes/class-services.php';
require_once HMBKP_PLUGIN_PATH . 'classes/class-schedule.php';
require_once HMBKP_PLUGIN_PATH . 'classes/class-schedules.php';
require_once HMBKP_PLUGIN_PATH . 'functions/core.php';
$schedules = HMBKP_Schedules::get_instance();
// Cancel all the schedules and delete all the backups
foreach ($schedules->get_schedules() as $schedule) {
    $schedule->cancel(true);
}
// Remove the backups directory
hmbkp_rmdirtree(hmbkp_path());
// Remove all the options
foreach (array('hmbkp_enable_support', 'hmbkp_plugin_version', 'hmbkp_path', 'hmbkp_default_path', 'hmbkp_upsell') as $option) {
    delete_option($option);
}
开发者ID:leewillis77,项目名称:backupwordpress,代码行数:22,代码来源:uninstall.php

示例15: tearDown

 /**
  * Cleanup the backup file and tmp directory
  * after every test
  */
 public function tearDown()
 {
     hmbkp_rmdirtree(hmbkp_path());
     @unlink($this->backup->get_root() . '/new.file');
     HM\BackUpWordPress\Path::get_instance()->reset_path();
 }
开发者ID:rjagadishsingh,项目名称:backupwordpress,代码行数:10,代码来源:testBackUpProcessTest.php


注:本文中的hmbkp_rmdirtree函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。