示例#1
0
文件: cache.php 项目: joebushi/joomla
 /**
  * Parse $path for cache file groups
  *
  * @return	array
  */
 protected function _parse($path = null)
 {
     $path = $path !== null ? $path : $this->getState('path');
     jimport('joomla.filesystem.folder');
     $folders = JFolder::folders($path);
     $data = array();
     foreach ($folders as $folder) {
         $files = array();
         $files = JFolder::files($path . DS . $folder);
         $item = new CacheItem($folder);
         foreach ($files as $file) {
             $item->updateSize(filesize($path . DS . $folder . DS . $file) / 1024);
         }
         $data[$folder] = $item;
     }
     return $data;
 }