private function path($dir, $list_file = true, $check_children = false) { $list = path_list($dir, $list_file, $check_children); $file_parem = array('filelist' => array(), 'folderlist' => array()); $path_hidden = $this->config['setting_system']['path_hidden']; $ex_name = explode(',', $path_hidden); foreach ($list['filelist'] as $key => $val) { if (in_array($val['name'], $ex_name)) { continue; } if ($val['ext'] == 'oexe') { $path = iconv_system($val['path']) . '/' . iconv_system($val['name']); $json = json_decode(file_get_contents($path), true); if (is_array($json)) { $val = array_merge($val, $json); } } $file_parem['filelist'][] = $val; } foreach ($list['folderlist'] as $key => $val) { if (in_array($val['name'], $ex_name)) { continue; } $file_parem['folderlist'][] = $val; } _DIR_OUT($file_parem); return $file_parem; }
private function path($dir, $list_file = true, $check_children = false) { $path_hidden = $this->config['setting_system']['path_hidden']; $ex_name = explode(',', $path_hidden); if (strstr($dir, "*share*")) { return $this->path_share(); } $list = path_list($dir, $list_file, $check_children); $filelist_new = array(); $folderlist_new = array(); foreach ($list['filelist'] as $key => $val) { if (in_array($val['name'], $ex_name)) { continue; } if ($val['ext'] == 'oexe') { $path = iconv_system($val['path']) . '/' . iconv_system($val['name']); $json = json_decode(file_get_contents($path), true); if (is_array($json)) { $val = array_merge($val, $json); } } $filelist_new[] = $val; } foreach ($list['folderlist'] as $key => $val) { if (in_array($val['name'], $ex_name)) { continue; } $folderlist_new[] = $val; } $list['filelist'] = $filelist_new; $list['folderlist'] = $folderlist_new; //读写权限判断 $list['path_type'] = 'readable'; if (is_writable($dir)) { $list['path_type'] = 'writeable'; } else { if (!is_readable($dir)) { $list['path_type'] = 'not_readable'; } } _DIR_OUT($list); return $list; }
private function path($dir, $list_file = true, $check_children = false) { $list = path_list($dir, $list_file, $check_children); foreach ($list['filelist'] as $key => $val) { if ($val['ext'] == 'oexe') { $path = iconv_system($val['path']) . '/' . iconv_system($val['name']); $json = json_decode(file_get_contents($path), true); if (is_array($json)) { $list['filelist'][$key] = array_merge($val, $json); } } } _DIR_OUT($list); return $list; }