コード例 #1
0
ファイル: Share.php プロジェクト: heldernl/owncloud8-extended
 /**
  * @param string $path
  * @return \Icewind\SMB\IFileInfo[]
  */
 public function stat($path)
 {
     $escapedPath = $this->escapePath($path);
     $output = $this->execute('allinfo ' . $escapedPath);
     if (count($output) < 3) {
         $this->parseOutput($output, $path);
     }
     $stat = $this->parser->parseStat($output);
     return new FileInfo($path, basename($path), $stat['size'], $stat['mtime'], $stat['mode']);
 }
コード例 #2
0
ファイル: Share.php プロジェクト: ZverAleksey/core
 /**
  * @param string $path
  * @return \Icewind\SMB\IFileInfo[]
  */
 public function stat($path)
 {
     $escapedPath = $this->escapePath($path);
     $output = $this->execute('allinfo ' . $escapedPath);
     // Windows and non Windows Fileserver may respond different
     // to the allinfo command for directories. If the result is a single
     // line = error line, redo it with a different allinfo parameter
     if ($escapedPath == '""' && count($output) < 2) {
         $output = $this->execute('allinfo ' . '"."');
     }
     if (count($output) < 3) {
         $this->parseOutput($output, $path);
     }
     $stat = $this->parser->parseStat($output);
     return new FileInfo($path, basename($path), $stat['size'], $stat['mtime'], $stat['mode']);
 }