/** * Goes through the 'JLD/' folder hierarchy */ public static function initFromFileSystem() { $pear = JLD_Directory::getPearIncludePath(); if (empty($pear)) { die(__CLASS__ . ': pear include path not found.'); } $dirs = JLD_Directory::getDirectoryInformation($pear . '/JLD', $pear, true, true); self::$cList = self::getFiles($pear, $dirs); }
/** * Reads all the categories from the directory structure * in the REST channel. */ public function readAll() { $path = $this->buildFileSystemRestPath(self::$baseCategories); // no need to get resursive here. $raw = JLD_Directory::getDirectoryInformation($path, $path, true, true); // strip off leading / foreach ($raw as &$e) { $e['name'] = substr($e['name'], 1); $this->cats[] = $e['name']; } }
/** */ protected function readAll() { // no need to get resursive here. $raw = JLD_Directory::getDirectoryInformation($this->restPathC, $this->restPathC, true, true); // strip off leading / foreach ($raw as &$e) { $e['name'] = substr($e['name'], 1); $this->cats[] = $e['name']; } return $raw; }
/** * Gets all the directory names from the base /p REST structure. */ public function getAllDirsFromRest() { $path = $this->buildFileSystemRestPath(self::$basePackages); $raw = JLD_Directory::getDirectoryInformation($path, $path, true, true); return $raw; }
/** * */ public function getAllFilesFromRest() { $path = $this->buildFileSystemRestPath(self::$baseReleases) . '/' . $this->package_name; $raw = JLD_Directory::getDirectoryInformation($path, $path, true, false); return $raw; }