Lines Matching refs:dir

737         foreach ($path as $dir) {
738 if (!strlen($dir)) {
741 switch ($dir) {
747 $new[] = $dir;
757 * @param string $dir
761 function chdir($dir) argument
768 if ($dir === '') {
769 $dir = './';
771 } elseif ($dir[strlen($dir) - 1] != '/') {
772 $dir.= '/';
775 $dir = $this->_realpath($dir);
778 if ($this->use_stat_cache && is_array($this->_query_stat_cache($dir))) {
779 $this->pwd = $dir;
788 if (!$this->_send_sftp_packet(NET_SFTP_OPENDIR, pack('Na*', strlen($dir), $dir))) {
810 $this->_update_stat_cache($dir, array());
812 $this->pwd = $dir;
819 * @param string $dir
824 function nlist($dir = '.', $recursive = false) argument
826 return $this->_nlist_helper($dir, $recursive, '');
832 * @param string $dir
838 function _nlist_helper($dir, $recursive, $relativeDir) argument
840 $files = $this->_list($dir, false);
854 if (is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $value)))) {
855 … $temp = $this->_nlist_helper($dir . '/' . $value, true, $relativeDir . $value . '/');
869 * @param string $dir
874 function rawlist($dir = '.', $recursive = false) argument
876 $files = $this->_list($dir, true);
891 … $is_directory = is_array($this->_query_stat_cache($this->_realpath($dir . '/' . $key)));
893 $stat = $this->lstat($dir . '/' . $key);
900 $files[$key] = $this->rawlist($dir . '/' . $key, true);
913 * @param string $dir
918 function _list($dir, $raw = true) argument
924 $dir = $this->_realpath($dir . '/');
925 if ($dir === false) {
930 if (!$this->_send_sftp_packet(NET_SFTP_OPENDIR, pack('Na*', strlen($dir), $dir))) {
951 $this->_update_stat_cache($dir, array());
990 $this->_update_stat_cache($dir . '/' . $shortname, array());
993 $temp = $this->_realpath($dir . '/..') . '/.';
995 $temp = $dir . '/' . $shortname;
1170 foreach ($dirs as $i => $dir) {
1177 if (!isset($temp[$dir])) {
1178 $temp[$dir] = array();
1181 if (is_object($temp[$dir]) && is_object($value)) {
1182 if (!isset($value->stat) && isset($temp[$dir]->stat)) {
1183 $value->stat = $temp[$dir]->stat;
1185 if (!isset($value->lstat) && isset($temp[$dir]->lstat)) {
1186 $value->lstat = $temp[$dir]->lstat;
1189 $temp[$dir] = $value;
1192 $temp = &$temp[$dir];
1209 foreach ($dirs as $i => $dir) {
1214 unset($temp[$dir]);
1217 if (!isset($temp[$dir])) {
1220 $temp = &$temp[$dir];
1238 foreach ($dirs as $dir) {
1242 if (!isset($temp[$dir])) {
1245 $temp = &$temp[$dir];
1783 * @param string $dir
1789 function mkdir($dir, $mode = -1, $recursive = false) argument
1795 $dir = $this->_realpath($dir);
1798 $dirs = explode('/', preg_replace('#/(?=/)|/$#', '', $dir));
1811 return $this->_mkdir_helper($dir, $mode);
1817 * @param string $dir
1822 function _mkdir_helper($dir, $mode) argument
1825 … if (!$this->_send_sftp_packet(NET_SFTP_MKDIR, pack('Na*a*', strlen($dir), $dir, "\0\0\0\0"))) {
1845 $this->chmod($mode, $dir);
1854 * @param string $dir
1858 function rmdir($dir) argument
1864 $dir = $this->_realpath($dir);
1865 if ($dir === false) {
1869 if (!$this->_send_sftp_packet(NET_SFTP_RMDIR, pack('Na*', strlen($dir), $dir))) {
1889 $this->_remove_from_stat_cache($dir);