/** * stat * * @param string $str * @return array */ public function stat($str) { $str = IOWrapper::set($str); if (!isset(self::$_stat[$str])) { self::$_stat[$str] = @stat($str); } if (isset(self::$_id[self::$_stat[$str]['uid']])) { self::$_stat[$str]['owner'] = self::$_id[self::$_stat[$str]['uid']]; } else { self::$_stat[$str]['owner'] = self::$_id[self::$_stat[$str]['uid']] = Helper_System::id2name(self::$_stat[$str]['uid']); } if (isset(self::$_id[self::$_stat[$str]['gid']])) { self::$_stat[$str]['group'] = self::$_id[self::$_stat[$str]['gid']]; } else { self::$_stat[$str]['group'] = self::$_id[self::$_stat[$str]['gid']] = Helper_System::id2name(self::$_stat[$str]['gid']); } return self::$_stat[$str]; }
/** * rawlistCallback * * @param array $data */ private function _rawlistCallback($data) { $data[10] = IOWrapper::get(trim($data[10])); self::$_rawlist[self::$_dir][Helper_System::basename($data[10])] = array('chmod' => $data[1] == 'd' && Registry::get('sysType') == 'WIN' ? 0777 : (Registry::get('sysType') == 'WIN' ? 0666 : $this->_chmodNum($data[2])), 'uid' => $data[3], 'owner' => is_numeric($data[3]) ? isset(self::$_id[$data[3]]) ? self::$_id[$data[3]] : (self::$_id[$data[3]] = Helper_System::id2name($data[3])) : $data[3], 'gid' => $data[4], 'group' => is_numeric($data[4]) ? isset(self::$_id[$data[4]]) ? self::$_id[$data[4]] : (self::$_id[$data[4]] = Helper_System::id2name($data[4])) : $data[4], 'size' => $data[5], 'mtime' => strtotime($data[6] . ' ' . $data[7] . ' ' . $data[8] . ':' . $data[9]), 'file' => $data[10], 'type' => $data[1] == 'd' ? 'dir' : ($data[1] == 'l' ? 'link' : 'file')); }