Lines Matching defs:file
67 * If $excuse is true an explanation is returned if the file
81 $file = wikiFN($id, $rev);
90 if (file_exists($file)) {
92 $ret = p_render('xhtml', p_get_instructions(io_readWikiPage($file, $id, $rev)), $info, $date_at);
96 } elseif (file_exists($file)) {
97 $ret = p_cached_output($file, 'xhtml', $id);
137 * Returns the given file parsed into the requested output format
139 * @param string $file filename, path to file
147 function p_cached_output($file, $format = 'xhtml', $id = '')
151 $cache = new CacheRenderer($id, $file, $format);
158 $parsed = p_render($format, p_cached_instructions($file, false, $id), $info);
176 * Returns the render instructions for a file
178 * Uses and creates a serialized cache file
180 * @param string $file filename, path to file
187 function p_cached_instructions($file, $cacheonly = false, $id = '')
192 $cache = new CacheInstructions($id, $file);
194 if ($cacheonly || $cache->useCache() || (isset($run[$file]) && !defined('DOKU_UNITTEST'))) {
196 } elseif (file_exists($file)) {
198 $ins = p_get_instructions(io_readWikiPage($file, $id));
200 $run[$file] = true; // we won't rebuild these instructions in the same run again
202 msg('Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.', -1);
300 // only update the file when the metadata has been changed
306 msg('Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.', -1);
457 $file = metaFN($id, '.meta');
458 $meta = file_exists($file) ?
459 unserialize(io_readFile($file, false)) :
470 * This is the backend function to save a metadata array to a file
594 'unformatted', 'code', 'file', 'quote', 'internallink', 'rss', 'media', 'externallink',
756 * Gets the first heading from a file