Esempio n. 1
0
 /**
  * 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::$_idUser[$data[3]]) ? self::$_idUser[$data[3]] : (self::$_idUser[$data[3]] = Helper_System::id2user($data[3])) : $data[3], 'gid' => $data[4], 'group' => is_numeric($data[4]) ? isset(self::$_idGroup[$data[4]]) ? self::$_idGroup[$data[4]] : (self::$_idGroup[$data[4]] = Helper_System::id2group($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'));
 }
Esempio n. 2
0
 /**
  * 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::$_idUser[self::$_stat[$str]['uid']])) {
         self::$_stat[$str]['owner'] = self::$_idUser[self::$_stat[$str]['uid']];
     } else {
         self::$_stat[$str]['owner'] = self::$_idUser[self::$_stat[$str]['uid']] = Helper_System::id2user(self::$_stat[$str]['uid']);
     }
     if (isset(self::$_idGroup[self::$_stat[$str]['gid']])) {
         self::$_stat[$str]['group'] = self::$_idGroup[self::$_stat[$str]['gid']];
     } else {
         self::$_stat[$str]['group'] = self::$_idGroup[self::$_stat[$str]['gid']] = Helper_System::id2group(self::$_stat[$str]['gid']);
     }
     return self::$_stat[$str];
 }