Lines Matching refs:base

17  * This function recurses into a given base directory
21 * @param string $base Where to start the search
24 * @param string $dir Current directory beyond $base
30 function search(&$data, $base, $func, $opts, $dir = '', $lvl = 1, $sort = 'natural')
37 if ($base == '' || $base == '/') {
38 throw new RuntimeException('No valid $base passed to search() - possible misconfiguration or bug');
42 $dh = @opendir($base . '/' . $dir);
46 if (is_dir($base . '/' . $dir . '/' . $file)) {
51 $filepaths[] = $base . '/' . $dir . '/' . $file;
65 if (call_user_func_array($func, [&$data, $base, $dir, 'd', $lvl, $opts])) {
66 search($data, $base, $func, $opts, $dir, $lvl + 1, $sort);
71 call_user_func_array($func, [&$data, $base, $file, 'f', $lvl, $opts]);
83 * string $base - Base usually $conf['datadir']
84 * string $file - current file or directory relative to $base
104 * @param string $base
112 function search_qsearch(&$data, $base, $file, $type, $lvl, $opts)
119 return search_universal($data, $base, $file, $type, $lvl, $opts);
130 * @param string $base
138 function search_index(&$data, $base, $file, $type, $lvl, $opts)
151 return search_universal($data, $base, $file, $type, $lvl, $opts);
160 * @param string $base
168 function search_namespaces(&$data, $base, $file, $type, $lvl, $opts)
171 return search_universal($data, $base, $file, $type, $lvl, $opts);
185 * @param string $base
193 function search_media(&$data, $base, $file, $type, $lvl, $opts)
224 $info['size'] = filesize($base . '/' . $file);
225 $info['mtime'] = filemtime($base . '/' . $file);
226 $info['writable'] = is_writable($base . '/' . $file);
229 $info['meta'] = new JpegMeta($base . '/' . $file);
253 * @param string $base
261 function search_mediafiles(&$data, $base, $file, $type, $lvl, $opts)
301 * @param string $base
309 function search_list(&$data, $base, $file, $type, $lvl, $opts)
333 * @param string $base
341 function search_pagename(&$data, $base, $file, $type, $lvl, $opts)
372 * @param string $base
380 function search_allpages(&$data, $base, $file, $type, $lvl, $opts)
406 $item['rev'] = filemtime($base . '/' . $file);
408 $item['size'] = filesize($base . '/' . $file);
491 * @param string $base - Base usually $conf['datadir']
492 * @param string $file - current file or directory relative to $base
501 function search_universal(&$data, $base, $file, $type, $lvl, $opts)
571 $item['size'] = filesize($base . '/' . $file);
572 $item['mtime'] = filemtime($base . '/' . $file);
574 $item['writable'] = is_writable($base . '/' . $file);
575 $item['executable'] = is_executable($base . '/' . $file);
579 if (!empty($opts['hash'])) $item['hash'] = md5(io_readFile($base . '/' . $file, false));