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


PHP rmdir_recursive函数代码示例

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


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

示例1: tearDown

 function tearDown()
 {
     $this->clearFilesInDirectory('custom/history/modules/Accounts/metadata');
     foreach ($this->modules as $module) {
         if (!$this->has_dir[$module]) {
             rmdir_recursive("custom/modules/{$module}");
         } else {
             $files = array('editviewdefs', 'detailviewdefs');
             foreach ($files as $file) {
                 if (file_exists("custom/modules/{$module}/metadata/{$file}.php.bak")) {
                     copy("custom/modules/{$module}/metadata/{$file}.php.bak", "custom/modules/{$module}/metadata/{$file}.php");
                     unlink("custom/modules/{$module}/metadata/{$file}.php.bak");
                 } else {
                     if (file_exists("custom/modules/{$module}/metadata/{$file}.php")) {
                         unlink("custom/modules/{$module}/metadata/{$file}.php");
                     }
                 }
                 if (file_exists("custom/modules/{$module}/metadata/{$module}.php.suback.bak")) {
                     copy("custom/modules/{$module}/metadata/{$file}.php.suback.bak", "custom/modules/{$module}/metadata/{$file}.php.suback.php");
                     unlink("custom/modules/{$module}/metadata/{$file}.php.suback.bak");
                 } else {
                     if (file_exists("custom/modules/{$module}/metadata/{$file}.php.suback.php")) {
                         unlink("custom/modules/{$module}/metadata/{$file}.php.suback.php");
                     }
                 }
             }
         }
     }
     //foreach
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:30,代码来源:Bug37841Test.php

示例2: clean_dir

function clean_dir($opts, $pipe = false, $cmd = __FUNCTION__)
{
    # set prefix
    $prefix = 'clean_dir';
    # merge opts
    $opts = merge_opts($opts, $pipe, 'dir');
    # get clearn dir opt
    $clean_dir = get_opt($prefix, $opts, 'clean_dir', true);
    if (!check_opt_set_type($cmd, $clean_dir, 'clean_dir', 'boolean')) {
        return false;
    }
    if ($clean_dir === false) {
        return true;
    }
    # get dir opt
    $dir = get_opt($prefix, $opts, 'dir');
    if (!check_opt_set_type($cmd, $dir, 'dir', 'string')) {
        return false;
    }
    # clean directory
    debug_echo($cmd, "cleaning local dir : {$dir}");
    if (!rmdir_recursive($dir)) {
        return error($cmd, "could not clean local dir : {$dir}");
    }
    return true;
}
开发者ID:simpl,项目名称:datapipe,代码行数:26,代码来源:filesystem.php

示例3: destroy

 /**
  * Destroy the entire index.
  */
 public function destroy()
 {
     $this->index = null;
     if (is_dir($this->indexPath)) {
         rmdir_recursive($this->indexPath);
     }
 }
开发者ID:ngangchill,项目名称:po,代码行数:10,代码来源:Connection.php

示例4: testWsdlNavService

 public function testWsdlNavService()
 {
     if (file_exists($this->genDir)) {
         rmdir_recursive($this->genDir);
     }
     mkdir($this->genDir . "/public/schemas", 0777, true);
     $service = new services\NavService();
     $this->tclass->setService($service);
     $this->tclass = $this->tclass->getImplementation($service);
     $this->tclass->setLocation("http://mylocation.com/soap/");
     $this->tclass->setSchemasPath("../resources/ContactWsdl");
     $this->tclass->setPublicPath(realpath($this->genDir . "/public/schemas"));
     $this->tclass->setPublicUrl("/schemas");
     $this->tclass->setDebug(true);
     $schemas = array("CodeList_CurrencyCode_ISO_7_04.xsd", "CodeList_LanguageCode_ISO_7_04.xsd", "CodeList_MIMEMediaTypeCode_IANA_7_04.xsd", "CodeList_UnitCode_UNECE_7_04.xsd", "ContactCompany.xsd", "ContactPerson.xsd", "UBL-CommonAggregateComponents-2.0.xsd", "UBL-CommonBasicComponents-2.0.xsd", "UBL-QualifiedDatatypes-2.0.xsd", "UnqualifiedDataTypeSchemaModule-2.0.xsd");
     $wsdl = $this->tclass->toXml();
     //print_r($wsdl);
     //file_put_contents($this->expDir."/NavService.wsdl", $wsdl);
     $expected = file_get_contents($this->expDir . "/NavService.wsdl");
     $this->assertEquals($expected, $wsdl);
     foreach ($schemas as $schema) {
         $exp = file_get_contents($this->expDir . "/public/schemas/" . $schema);
         $act = file_get_contents($this->genDir . "/public/schemas/" . $schema);
         $this->assertEquals($exp, $act);
     }
     if (file_exists($this->genDir)) {
         rmdir_recursive($this->genDir);
     }
 }
开发者ID:irfan-blackhawk,项目名称:XSD-to-PHP,代码行数:29,代码来源:WsdlTest.php

示例5: tearDown

 function tearDown()
 {
     foreach ($this->modules as $module) {
         if (!$this->has_dir[$module]) {
             rmdir_recursive("custom/modules/{$module}");
         } else {
             $files = array('searchdefs');
             foreach ($files as $file) {
                 if (file_exists("custom/modules/{$module}/metadata/{$file}.php.bak")) {
                     copy("custom/modules/{$module}/metadata/{$file}.php.bak", "custom/modules/{$module}/metadata/{$file}.php");
                     unlink("custom/modules/{$module}/metadata/{$file}.php.bak");
                 } else {
                     if (file_exists("custom/modules/{$module}/metadata/{$file}.php")) {
                         unlink("custom/modules/{$module}/metadata/{$file}.php");
                     }
                 }
                 if (file_exists("custom/modules/{$module}/metadata/{$module}.php.suback.bak")) {
                     copy("custom/modules/{$module}/metadata/{$file}.php.suback.bak", "custom/modules/{$module}/metadata/{$file}.php.suback.php");
                     unlink("custom/modules/{$module}/metadata/{$file}.php.suback.bak");
                 } else {
                     if (file_exists("custom/modules/{$module}/metadata/{$file}.php.suback.php")) {
                         unlink("custom/modules/{$module}/metadata/{$file}.php.suback.php");
                     }
                 }
             }
         }
     }
     //foreach
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:29,代码来源:Bug37862Test.php

示例6: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if (is_dir($this->indexPath)) {
         rmdir_recursive($this->indexPath);
     }
 }
开发者ID:robvanbentem,项目名称:laravel-lucene-search,代码行数:7,代码来源:ConnectionTest.php

示例7: teardownFiles

 public static function teardownFiles()
 {
     foreach (self::$modules as $module) {
         if (!self::$has_dir[$module]) {
             rmdir_recursive("custom/modules/{$module}");
         } else {
             foreach (self::$files as $file) {
                 if (file_exists("custom/modules/{$module}/metadata/{$file}.php.bak")) {
                     copy("custom/modules/{$module}/metadata/{$file}.php.bak", "custom/modules/{$module}/metadata/{$file}.php");
                     unlink("custom/modules/{$module}/metadata/{$file}.php.bak");
                 } else {
                     if (file_exists("custom/modules/{$module}/metadata/{$file}.php")) {
                         unlink("custom/modules/{$module}/metadata/{$file}.php");
                     }
                 }
                 if (file_exists("custom/modules/{$module}/metadata/{$module}.php.suback.bak")) {
                     copy("custom/modules/{$module}/metadata/{$file}.php.suback.bak", "custom/modules/{$module}/metadata/{$file}.php.suback.php");
                     unlink("custom/modules/{$module}/metadata/{$file}.php.suback.bak");
                 } else {
                     if (file_exists("custom/modules/{$module}/metadata/{$file}.php.suback.php")) {
                         unlink("custom/modules/{$module}/metadata/{$file}.php.suback.php");
                     }
                 }
             }
         }
     }
     //foreach
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:28,代码来源:SugarTestMergeUtilities.php

示例8: tearDown

 public function tearDown()
 {
     if (is_dir("custom/modules/{$this->_moduleName}")) {
         rmdir_recursive("custom/modules/{$this->_moduleName}");
     }
     unset($GLOBALS['dashletStrings']);
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:7,代码来源:Bug41013Test.php

示例9: remove

 public function remove($slug)
 {
     if (empty($slug)) {
         $this->templatemanager->notify_next("Plugin not defined!");
     } else {
         $pl = PluginManager::plugin($slug);
         $pl->uninstall();
         @rmdir_recursive('./iu-resources/plugins/' . $slug);
     }
     redirect('administration/plugins');
 }
开发者ID:jotavejv,项目名称:CMS,代码行数:11,代码来源:plugins.php

示例10: fire

 public function fire()
 {
     if (!$this->option('verbose')) {
         $this->output = new NullOutput();
     }
     if ($result = rmdir_recursive(Config::get('laravel-lucene-search.index.path'))) {
         $this->info('Search index is cleared.');
     } else {
         $this->comment('There is nothing to clear..');
     }
 }
开发者ID:robvanbentem,项目名称:laravel-lucene-search,代码行数:11,代码来源:ClearCommand.php

示例11: testDisplayWithClassicCustomView

 public function testDisplayWithClassicCustomView()
 {
     $view = $this->getMock('ViewClassic', array('includeClassicFile'));
     $view->module = 'testmodule' . mt_rand();
     $view->action = 'testaction' . mt_rand();
     sugar_mkdir("custom/modules/{$view->module}", null, true);
     sugar_touch("custom/modules/{$view->module}/{$view->action}.php");
     $return = $view->display();
     rmdir_recursive("custom/modules/{$view->module}");
     $this->assertTrue($return);
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:11,代码来源:ViewClassicTest.php

示例12: tearDown

 public function tearDown()
 {
     if (is_dir("modules/{$this->_moduleName}")) {
         rmdir_recursive("modules/{$this->_moduleName}");
     }
     if (is_dir("custom/modules/{$this->_moduleName}")) {
         rmdir_recursive("custom/modules/{$this->_moduleName}");
     }
     unset($GLOBALS['dashletStrings']);
     $GLOBALS['current_language'] = $GLOBALS['sugar_config']['default_language'];
 }
开发者ID:nickpro,项目名称:sugarcrm_dev,代码行数:11,代码来源:DashletLoadLanguageTest.php

示例13: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if ($this->packageExists) {
         //Copy original contents back in
         copy_recursive('custom/modules/' . $this->package . '_bak', 'custom/modules/' . $this->package);
         rmdir_recursive('custom/modules/' . $this->package . '_bak');
     } else {
         rmdir_recursive('custom/modules/' . $this->package);
     }
     unset($_SESSION['avail_modules'][$this->package]);
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:12,代码来源:Bug48748Test.php

示例14: setUp

 public function setUp()
 {
     if (!function_exists('imagecreatetruecolor')) {
         $this->markTestSkipped('imagecreatetruecolor function not found.  skipping test');
         return;
     }
     $this->useSprites = $GLOBALS['sugar_config']['use_sprites'];
     $GLOBALS['sugar_config']['use_sprites'] = true;
     if (file_exists('cache/sprites')) {
         rmdir_recursive('cache/sprites');
     }
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:12,代码来源:SugarSpriteBuilderTest.php

示例15: testSavePHPBindings

 public function testSavePHPBindings()
 {
     if (file_exists($this->generatedDir . "/bindings")) {
         rmdir_recursive($this->generatedDir . "/bindings");
     }
     //$this->tclass->saveClasses($this->expectedDir."/bindings", true);
     $this->tclass->saveClasses($this->generatedDir . "/bindings", true);
     $this->assertDirContentsEquals($this->expectedDir . "/bindings", $this->generatedDir . "/bindings");
     if (file_exists($this->generatedDir . "/bindings")) {
         rmdir_recursive($this->generatedDir . "/bindings");
     }
 }
开发者ID:irfan-blackhawk,项目名称:XSD-to-PHP,代码行数:12,代码来源:MavenXsdTest.php


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