Lines Matching refs:file

40     while(($file = readdir($dh)) !== false){
41 if(preg_match('/^[\._]/',$file)) continue; //skip hidden files and upper dirs
42 if(is_dir($base.'/'.$dir.'/'.$file)){
43 $dirs[] = $dir.'/'.$file;
46 $files[] = $dir.'/'.$file;
47 $filepaths[] = $base.'/'.$dir.'/'.$file;
66 foreach($files as $file){
67 call_user_func_array($func, array(&$data,$base,$file,'f',$lvl,$opts));
101 * @param string $file
108 function search_qsearch(&$data,$base,$file,$type,$lvl,$opts){ argument
114 return search_universal($data,$base,$file,$type,$lvl,$opts);
126 * @param string $file
133 function search_index(&$data,$base,$file,$type,$lvl,$opts){ argument
142 'depth' => preg_match('#^'.preg_quote($file, '#').'(/|$)#','/'.$ns) ? 0 : -1
145 return search_universal($data, $base, $file, $type, $lvl, $opts);
155 * @param string $file
162 function search_namespaces(&$data,$base,$file,$type,$lvl,$opts){ argument
166 return search_universal($data,$base,$file,$type,$lvl,$opts);
181 * @param string $file
188 function search_media(&$data,$base,$file,$type,$lvl,$opts){ argument
193 $depth = substr_count($file,'/');
199 $info['id'] = pathID($file,true);
217 $info['file'] = \dokuwiki\Utf8\PhpString::basename($file);
218 $info['size'] = filesize($base.'/'.$file);
219 $info['mtime'] = filemtime($base.'/'.$file);
220 $info['writable'] = is_writable($base.'/'.$file);
221 if(preg_match("/\.(jpe?g|gif|png)$/",$file)){
223 $info['meta'] = new JpegMeta($base.'/'.$file);
248 * @param string $file
255 function search_mediafiles(&$data,$base,$file,$type,$lvl,$opts){ argument
260 $depth = substr_count($file,'/');
265 $id = pathID($file,true);
295 * @param string $file
302 function search_list(&$data,$base,$file,$type,$lvl,$opts){ argument
306 if(substr($file,-4) == '.txt'){
308 $id = pathID($file);
326 * @param string $file
333 function search_pagename(&$data,$base,$file,$type,$lvl,$opts){ argument
337 if(substr($file,-4) != '.txt') return true;
341 if(strpos($file,$opts['query']) !== false){
343 $id = pathID($file);
364 * @param string $file
371 function search_allpages(&$data,$base,$file,$type,$lvl,$opts){ argument
373 $parts = explode('/',ltrim($file,'/'));
386 if(substr($file,-4) != '.txt') return true;
389 $item['id'] = pathID($file);
394 $item['rev'] = filemtime($base.'/'.$file);
396 $item['size'] = filesize($base.'/'.$file);
478 * @param string $file - current file or directory relative to $base
487 function search_universal(&$data,$base,$file,$type,$lvl,$opts){ argument
492 $item['id'] = pathID($file,($type == 'd' || !empty($opts['keeptxt'])));
506 $depth = substr_count($file,'/');
515 $match = empty($opts['recmatch']) || preg_match('/'.$opts['recmatch'].'/',$file);
538 … if(!empty($opts['dirmatch']) && !preg_match('/'.$opts['dirmatch'].'/',$file)) return $return;
543 if(!empty($opts['pagesonly']) && (substr($file,-4) != '.txt')) return $return;
545 … if(!empty($opts['filematch']) && !preg_match('/'.$opts['filematch'].'/',$file)) return $return;
555 $item['file'] = \dokuwiki\Utf8\PhpString::basename($file);
556 $item['size'] = filesize($base.'/'.$file);
557 $item['mtime'] = filemtime($base.'/'.$file);
559 $item['writable'] = is_writable($base.'/'.$file);
560 $item['executable'] = is_executable($base.'/'.$file);
564 if(!empty($opts['hash'])) $item['hash'] = md5(io_readFile($base.'/'.$file,false));