Exemplo n.º 1
7
 public function setup()
 {
     clearstatcache();
     $fs = new Adapter\Local(__DIR__ . '/');
     $fs->deleteDir('files');
     $fs->createDir('files');
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function deleteDir($dirname)
 {
     $location = $this->applyPathPrefix($dirname);
     if (!is_dir($location) || !is_writable($location)) {
         return false;
     }
     return parent::deleteDir($dirname);
 }
Exemplo n.º 3
0
 public function testDeleteDir()
 {
     $this->adapter->write('nested/dir/path.txt', 'contents', new Config());
     $this->assertTrue(is_dir(__DIR__ . '/files/nested/dir'));
     $this->adapter->deleteDir('nested');
     $this->assertFalse($this->adapter->has('nested/dir/path.txt'));
     $this->assertFalse(is_dir(__DIR__ . '/files/nested/dir'));
 }