Lines Matching refs:file
90 * @param string $file file to delete
93 public function delete($file, $type) { argument
96 $size = filesize($file);
101 if(@unlink($file)){
105 fwrite($this->log, "$time\t$size\t$type\t$file\n");
109 $this->list[] = $file;
113 $this->list[] = $file;
140 public function cb_check_cache(&$data, $base, $file, $type, $lvl, $opts) { argument
143 if($lvl == 1 && !preg_match('/^\/[a-f0-9]$/', $file)) return false;
148 $time = $opts['useatime'] ? fileatime($base . $file) : filemtime($base . $file);
151 $this->delete($base.$file, 'cache');
159 public function cb_check_attic(&$data, $base, $file, $type, $lvl, $opts) { argument
164 $time = filemtime($base . $file);
168 $path = preg_replace('/\.\d+\.txt(\.gz)?$/', '', $file);
173 $this->delete($base.$file, 'attic');
181 public function cb_check_mediaattic(&$data, $base, $file, $type, $lvl, $opts) { argument
186 $time = filemtime($base . $file);
190 list($ext) = mimetype($file);
192 $path = preg_replace('/\.\d+\.' . $ext . '?$/', ".$ext", $file);
198 $this->delete($base.$file, 'mediattic');
206 public function cb_check_meta(&$data, $base, $file, $type, $lvl, $opts) { argument
212 if(!preg_match('/\.(meta|changes|indexed)$/', $file, $m)) return false;
215 $time = filemtime($base . $file);
217 $path = substr($file, 0, -1 * (strlen($type) + 1));
221 $this->delete($base.$file, 'meta');
229 public function cb_check_mediameta(&$data, $base, $file, $type, $lvl, $opts) { argument
235 if(!preg_match('/\.(changes)$/', $file, $m)) return false;
238 $time = filemtime($base . $file);
240 $path = substr($file, 0, -1 * (strlen($type) + 1));
244 $this->delete($base.$file, 'mediameta');
252 public function cb_check_locks(&$data, $base, $file, $type, $lvl, $opts) { argument
258 if(!preg_match('/\.(lock)$/', $file, $m)) return false;
261 $time = filemtime($base . $file);
263 $this->delete($base.$file, 'lock');