Lines Matching refs:sftp

6  * Creates an sftp:// protocol handler that can be used with, for example, fopen(), dir(), etc.
43 private $sftp;
109 public static function register($protocol = 'sftp')
170 $this->sftp = $host;
176 $sftp = $context[$scheme]['session'];
178 if (isset($context[$scheme]['sftp'])) {
179 $sftp = $context[$scheme]['sftp'];
181 if (isset($sftp) && $sftp instanceof SFTP) {
182 $this->sftp = $sftp;
201 $this->sftp = self::$instances[$host][$port][$user][(string) $pass];
203 $this->sftp = new SFTP($host, $port);
204 $this->sftp->disableStatCache();
217 if (!$this->sftp->login($user, $pass)) {
223 if (!$this->sftp->login($user, $pass)) {
227 self::$instances[$host][$port][$user][(string) $pass] = $this->sftp;
252 $this->size = $this->sftp->filesize($path);
260 $this->sftp->touch($path);
268 $this->sftp->truncate($path, 0);
300 $result = $this->sftp->get($this->path, false, $this->pos, $count);
303 call_user_func($this->notification, STREAM_NOTIFY_FAILURE, STREAM_NOTIFY_SEVERITY_ERR, $this->sftp->getLastSFTPError(), NET_SFTP_OPEN, 0, 0);
332 $result = $this->sftp->put($this->path, $data, SFTP::SOURCE_STRING, $this->pos);
335 call_user_func($this->notification, STREAM_NOTIFY_FAILURE, STREAM_NOTIFY_SEVERITY_ERR, $this->sftp->getLastSFTPError(), NET_SFTP_OPEN, 0, 0);
429 return $this->sftp->touch($path, $time, $atime);
434 return $this->sftp->chown($path, $var);
436 return $this->sftp->chgrp($path, $var);
438 return $this->sftp->chmod($path, $var) !== false;
450 return $this->sftp->fsock;
493 if (!$this->sftp->rename($path_from, $path_to)) {
494 if ($this->sftp->stat($path_to)) {
495 return $this->sftp->delete($path_to, true) && $this->sftp->rename($path_from, $path_to);
533 $this->entries = $this->sftp->nlist($path);
588 return $this->sftp->mkdir($path, $mode, $options & STREAM_MKDIR_RECURSIVE);
610 return $this->sftp->rmdir($path);
632 $results = $this->sftp->stat($this->path);
652 return $this->sftp->delete($path, false);
673 $results = $flags & STREAM_URL_STAT_LINK ? $this->sftp->lstat($path) : $this->sftp->stat($path);
689 if (!$this->sftp->truncate($this->path, $new_size)) {