Index: trunk/phase3/includes/filerepo/NullRepo.php |
— | — | @@ -20,6 +20,9 @@ |
21 | 21 | function deleteBatch( $sourceDestPairs ) { |
22 | 22 | return false; |
23 | 23 | } |
| 24 | + function fileExistsBatch( $files, $flags = 0 ) { |
| 25 | + return false; |
| 26 | + } |
24 | 27 | function getFileProps( $virtualUrl ) { |
25 | 28 | return false; |
26 | 29 | } |
Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -401,7 +401,22 @@ |
402 | 402 | */ |
403 | 403 | abstract function publishBatch( $triplets, $flags = 0 ); |
404 | 404 | |
| 405 | + function fileExists( $file, $flags = 0 ) { |
| 406 | + $result = $this->fileExistsBatch( array( $file ), $flags ); |
| 407 | + return $file; |
| 408 | + } |
| 409 | + |
405 | 410 | /** |
| 411 | + * Checks existence of an array of files. |
| 412 | + * |
| 413 | + * @param array $files URLs (or paths) of files to check |
| 414 | + * @param integer $flags Bitwise combination of the following flags: |
| 415 | + * self::FILES_ONLY Mark file as existing only if it is a file (not directory) |
| 416 | + * @return Either array of files and existence flags, or false |
| 417 | + */ |
| 418 | + abstract function fileExistsBatch( $files, $flags = 0 ); |
| 419 | + |
| 420 | + /** |
406 | 421 | * Move a group of files to the deletion archive. |
407 | 422 | * |
408 | 423 | * If no valid deletion archive is configured, this may either delete the |
Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -57,6 +57,9 @@ |
58 | 58 | function deleteBatch( $sourceDestPairs ) { |
59 | 59 | return false; |
60 | 60 | } |
| 61 | + function fileExistsBatch( $files, $flags = 0 ) { |
| 62 | + return false; |
| 63 | + } |
61 | 64 | function getFileProps( $virtualUrl ) { |
62 | 65 | return false; |
63 | 66 | } |