Exemple #1
0
 public function mkdir($path)
 {
     $path = $this->buildPath($path);
     try {
         $this->share->mkdir($path);
         return true;
     } catch (Exception $e) {
         return false;
     }
 }
Exemple #2
0
 public function mkdir($path)
 {
     $path = $this->buildPath($path);
     try {
         $this->share->mkdir($path);
         return true;
     } catch (ConnectException $e) {
         throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e);
     } catch (Exception $e) {
         return false;
     }
 }
 /**
  * @param string $path
  * @param callable $callback callable which will be called for each received change
  * @return mixed
  */
 public function notify($path, callable $callback)
 {
     // php-smbclient does support notify (https://github.com/eduardok/libsmbclient-php/issues/29)
     // so we use the smbclient based backend for this
     $share = new Share($this->server, $this->getName());
     $share->notify($path, $callback);
 }