Index: branches/FileBackend/phase3/includes/filerepo/FileBackend.php |
— | — | @@ -272,42 +272,3 @@ |
273 | 273 | |
274 | 274 | } // end class |
275 | 275 | |
276 | | - |
277 | | -/** |
278 | | - * A helper class for FileBackend. Some filestores won't have files in the filesystem, |
279 | | - * so we can't count on being able to hand out the filename. Instead, we hand out an |
280 | | - * instance of this class, which will DTRT for all filestores. |
281 | | - */ |
282 | | -class TempLocalFile { |
283 | | - |
284 | | - /** |
285 | | - * @param String $file - mwrepo:// url for the file to hand out. |
286 | | - */ |
287 | | - public function __construct( $file ) { |
288 | | - $this->tempPath = $file; |
289 | | - } |
290 | | - |
291 | | - /** |
292 | | - * Returns a file path pointing to our file or a copy thereof. |
293 | | - * @return String |
294 | | - */ |
295 | | - public function path() { |
296 | | - return $this->tempPath; |
297 | | - } |
298 | | - |
299 | | - /** |
300 | | - * we don't have a close() method. Just let the instance go out of scope. |
301 | | - */ |
302 | | - |
303 | | - /** |
304 | | - * if we need to delete the file, do so now. |
305 | | - */ |
306 | | - public function __destruct() { |
307 | | - if ( $this->tempPath ) { |
308 | | - // Clean up temporary data. |
309 | | - // Only if we actually made a local copy!! unlink( $this->tempPath ); |
310 | | - $this->tempPath = null; |
311 | | - } |
312 | | - } |
313 | | - |
314 | | -} // end class |