Lines Matching refs:path

839      * @param string $path
844 public function realpath($path) argument
851 return $path;
856 $this->send_sftp_packet(NET_SFTP_REALPATH, Strings::packSSH2('s', $path));
875 if (!strlen($path) || $path[0] != '/') {
876 $path = $this->pwd . '/' . $path;
879 $path = explode('/', $path);
881 foreach ($path as $dir) {
1262 * @param string $path
1266 private function update_stat_cache($path, $value) argument
1273 $dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
1306 * @param string $path
1310 private function remove_from_stat_cache($path) argument
1312 $dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
1336 * @param string $path
1340 private function query_stat_cache($path) argument
1342 $dirs = explode('/', preg_replace('#^/|/(?=/)|/$#', '', $path));
1768 * @param string $path
1774 private function setstat_recursive($path, $attr, &$i) argument
1780 $entries = $this->readlist($path, true);
1783 return $this->setstat($path, $attr, false);
1798 $temp = $path . '/' . $filename;
1821 $packet = Strings::packSSH2('s', $path);
2520 * @param string $path
2526 public function delete($path, $recursive = true) argument
2532 if (is_object($path)) {
2534 $path = (string) $path;
2537 if (!is_string($path) || $path == '') {
2541 $path = $this->realpath($path);
2542 if ($path === false) {
2547 $this->send_sftp_packet(NET_SFTP_REMOVE, pack('Na*', strlen($path), $path));
2564 $result = $this->delete_recursive($path, $i);
2569 $this->remove_from_stat_cache($path);
2579 * @param string $path
2584 private function delete_recursive($path, &$i) argument
2590 $entries = $this->readlist($path, true);
2604 $temp = $path . '/' . $filename;
2624 $this->send_sftp_packet(NET_SFTP_RMDIR, Strings::packSSH2('s', $path));
2625 $this->remove_from_stat_cache($path);
2642 * @param string $path
2646 public function file_exists($path) argument
2653 $path = $this->realpath($path);
2655 $result = $this->query_stat_cache($path);
2663 return $this->stat($path) !== false;
2669 * @param string $path
2673 public function is_dir($path) argument
2675 $result = $this->get_stat_cache_prop($path, 'type');
2685 * @param string $path
2689 public function is_file($path) argument
2691 $result = $this->get_stat_cache_prop($path, 'type');
2701 * @param string $path
2705 public function is_link($path) argument
2707 $result = $this->get_lstat_cache_prop($path, 'type');
2717 * @param string $path
2721 public function is_readable($path) argument
2727 $packet = Strings::packSSH2('sNN', $this->realpath($path), NET_SFTP_OPEN_READ, 0);
2745 * @param string $path
2749 public function is_writable($path) argument
2755 $packet = Strings::packSSH2('sNN', $this->realpath($path), NET_SFTP_OPEN_WRITE, 0);
2775 * @param string $path
2779 public function is_writeable($path) argument
2781 return $this->is_writable($path);
2787 * @param string $path
2791 public function fileatime($path) argument
2793 return $this->get_stat_cache_prop($path, 'atime');
2799 * @param string $path
2803 public function filemtime($path) argument
2805 return $this->get_stat_cache_prop($path, 'mtime');
2811 * @param string $path
2815 public function fileperms($path) argument
2817 return $this->get_stat_cache_prop($path, 'mode');
2823 * @param string $path
2827 public function fileowner($path) argument
2829 return $this->get_stat_cache_prop($path, 'uid');
2835 * @param string $path
2839 public function filegroup($path) argument
2841 return $this->get_stat_cache_prop($path, 'gid');
2847 * @param string $path
2851 public function filesize($path) argument
2853 return $this->get_stat_cache_prop($path, 'size');
2859 * @param string $path
2863 public function filetype($path) argument
2865 $type = $this->get_stat_cache_prop($path, 'type');
2893 * @param string $path
2898 private function get_stat_cache_prop($path, $prop) argument
2900 return $this->get_xstat_cache_prop($path, $prop, 'stat');
2908 * @param string $path
2913 private function get_lstat_cache_prop($path, $prop) argument
2915 return $this->get_xstat_cache_prop($path, $prop, 'lstat');
2923 * @param string $path
2929 private function get_xstat_cache_prop($path, $prop, $type) argument
2936 $path = $this->realpath($path);
2938 $result = $this->query_stat_cache($path);
2945 $result = $this->$type($path);