Esempio n. 1
0
 /**
  * @param string $path
  * @return \Icewind\SMB\IFileInfo
  */
 protected function getFileInfo($path)
 {
     $path = $this->buildPath($path);
     if (!isset($this->statCache[$path])) {
         $this->statCache[$path] = $this->share->stat($path);
     }
     return $this->statCache[$path];
 }
Esempio n. 2
0
 /**
  * @param string $path
  * @return \Icewind\SMB\IFileInfo
  * @throws StorageNotAvailableException
  */
 protected function getFileInfo($path)
 {
     try {
         $path = $this->buildPath($path);
         if (!isset($this->statCache[$path])) {
             $this->statCache[$path] = $this->share->stat($path);
         }
         return $this->statCache[$path];
     } catch (ConnectException $e) {
         throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
     }
 }