Example #1
0
File: smb.php Project: evanjt/core
 public function mkdir($path)
 {
     $path = $this->buildPath($path);
     try {
         $this->share->mkdir($path);
         return true;
     } catch (Exception $e) {
         return false;
     }
 }
Example #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;
     }
 }
Example #3
0
 /**
  * @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);
 }