rmdir() 공개 정적인 메소드

Contributed by Askar (ARACOOL)
public static rmdir ( string $dir, boolean $traverseSymlinks = false ) : boolean
$dir string The directory to be deleted recursively
$traverseSymlinks boolean Delete contents of symlinks recursively
리턴 boolean
예제 #1
0
파일: PathTest.php 프로젝트: JBZoo/Path
 public function setUp()
 {
     $this->_root = FS::clean(__DIR__ . '/test', '/');
     FS::rmdir($this->_root);
     mkdir($this->_root, 0777, true);
     $this->_paths = array($this->_root, $this->_root . DS . 'folder');
 }
예제 #2
0
 protected function setUp()
 {
     $_SERVER['HTTP_HOST'] = 'example.com';
     $_SERVER['SERVER_PORT'] = '80';
     FS::rmdir(PROJECT_ROOT . '/cache');
     FS::rmdir(PROJECT_ROOT . '/tests/cache');
 }
예제 #3
0
 public function setUp()
 {
     $root = FS::clean(__DIR__ . '/test', '/');
     FS::rmdir($root);
     mkdir($root, 0777, true);
     $this->_root = $root;
 }
예제 #4
0
 protected function setUp()
 {
     parent::setUp();
     if (!class_exists('\\JBZoo\\Utils\\FS')) {
         throw new Exception('jbzoo/utils required for CovCatcher unit-tests');
     }
     FS::rmdir(PROJECT_BUILD . '/coverage_cov');
     FS::rmdir(PROJECT_BUILD . '/coverage_html');
     FS::rmdir(PROJECT_BUILD . '/coverage_xml');
 }
예제 #5
0
 protected function setUp()
 {
     parent::setUp();
     if (!class_exists('\\JBZoo\\Utils\\Sys')) {
         throw new Exception('jbzoo/utils required for HttpServer unit-tests');
     }
     if (!class_exists('\\JBZoo\\HttpClient\\HttpClient')) {
         throw new Exception('jbzoo/http-client required for HttpServer unit-tests');
     }
     if (Sys::isPHP53() || Sys::isHHVM()) {
         skip('PHP 5.3.x/7.0/hhvm doen\'t support built-in web-server');
     }
     FS::rmdir(PROJECT_BUILD . '/coverage_cov');
     FS::rmdir(PROJECT_BUILD . '/coverage_html');
     FS::rmdir(PROJECT_BUILD . '/coverage_xml');
 }
예제 #6
0
 public function testLS()
 {
     $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'dir1';
     @mkdir($dir);
     $file1 = $dir . DIRECTORY_SEPARATOR . 'file1';
     touch($file1);
     is(array($file1), FS::ls($dir));
     FS::rmdir($dir);
 }