public function testDelAfterStat()
 {
     $name = 'foo.txt';
     $txtFile = $this->getTextFile();
     $this->share->put($txtFile, $this->root . '/' . $name);
     unlink($txtFile);
     $this->share->stat($this->root . '/' . $name);
     $this->share->del($this->root . '/foo.txt');
 }
 /**
  * Get all of the metadata for a file or directory.
  *
  * @param string $path
  * @return array|false
  */
 public function getMetadata($path)
 {
     $fullPath = $this->applyPathPrefix($path);
     try {
         $file = $this->share->stat($fullPath);
     } catch (NotFoundException $e) {
         return false;
     }
     return $this->normalizeFileInfo($file);
 }
Exemple #3
0
 public function testStatRoot()
 {
     $info = $this->share->stat('/');
     $this->assertInstanceOf('\\Icewind\\SMB\\IFileInfo', $info);
 }