• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP hmbkp_rmdirtree函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP hmmpm函数代码示例发布时间:2022-05-15
下一篇:
PHP hmbkp_path函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap