Beispiel #1
0
 /**
  * Delete the contents of a directory.
  *
  * @param string $path
  */
 protected function deleteContents($path)
 {
     $contents = $this->listContents($path, true) ?: array();
     foreach (array_reverse($contents) as $object) {
         $fullPath = $this->applyPathPrefix($object['path']);
         if ($object['type'] === 'dir') {
             $this->share->rmdir($fullPath);
         } else {
             $this->share->del($fullPath);
         }
     }
 }
 /**
  * @expectedException \Icewind\SMB\Exception\NotFoundException
  */
 public function testRmDirNonExisting()
 {
     $this->share->rmdir('/foobar/asd');
 }