public function dir_closedir() { AJXP_Logger::debug(__CLASS__, __FUNCTION__, "CLOSEDIR"); self::$dirContent = null; self::$dirContentKeys = null; self::$dirContentLoopPath = null; self::$dirContentIndex = 0; }
public function dir_closedir() { self::$dirContent = null; self::$dirContentKeys = null; self::$dirContentIndex = 0; }
public function dir_opendir($url, $options) { $parts = $this->parseUrl($url); $link = $this->createFTPLink(); $serverPath = AJXP_Utils::securePath($this->path . "/" . $parts["path"]); $contents = $this->rawList($link, $serverPath); $folders = $files = array(); foreach ($contents as $entry) { $result = $this->rawListEntryToStat($entry); //AbstractAccessDriver::fixPermissions($result["stat"], ConfService::getRepositoryById($this->repositoryId), array($this, "getRemoteUserId")); $isDir = $result["dir"]; $statValue = $result["stat"]; $file = $result["name"]; if ($isDir) { $folders[$file] = $statValue; } else { $files[$file] = $statValue; } } // Append all files keys to folders. Do not use array_merge. foreach ($files as $key => $value) { $folders[$key] = $value; } AJXP_Logger::debug("OPENDIR ", $folders); self::$dirContent = $folders; //array_merge($folders, $files); self::$dirContentKeys = array_keys(self::$dirContent); self::$dirContentIndex = 0; return true; }