Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php |
— | — | @@ -417,7 +417,7 @@ |
418 | 418 | if ( !$readable ) { |
419 | 419 | return null; // bad permissions? |
420 | 420 | } |
421 | | - return new FSFileIterator( $dir ); |
| 421 | + return new FSFileBackendFileList( $dir ); |
422 | 422 | } |
423 | 423 | |
424 | 424 | /** |
— | — | @@ -508,15 +508,13 @@ |
509 | 509 | * |
510 | 510 | * @ingroup FileBackend |
511 | 511 | */ |
512 | | -class FSFileIterator implements Iterator { |
| 512 | +class FSFileBackendFileList implements Iterator { |
513 | 513 | /** @var RecursiveIteratorIterator */ |
514 | 514 | protected $iter; |
515 | 515 | protected $suffixStart; // integer |
516 | 516 | |
517 | 517 | /** |
518 | | - * Get an FSFileIterator from a file system directory |
519 | | - * |
520 | | - * @param $dir string |
| 518 | + * @param $dir string file system directory |
521 | 519 | */ |
522 | 520 | public function __construct( $dir ) { |
523 | 521 | $dir = realpath( $dir ); // normalize |
Index: trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php |
— | — | @@ -454,11 +454,11 @@ |
455 | 455 | * @see FileBackend::getFileListInternal() |
456 | 456 | */ |
457 | 457 | public function getFileListInternal( $fullCont, $dir, array $params ) { |
458 | | - return new SwiftFileIterator( $this, $fullCont, $dir ); |
| 458 | + return new SwiftFileBackendFileList( $this, $fullCont, $dir ); |
459 | 459 | } |
460 | 460 | |
461 | 461 | /** |
462 | | - * Do not call this function outside of SwiftFileIterator |
| 462 | + * Do not call this function outside of SwiftFileBackendFileList |
463 | 463 | * |
464 | 464 | * @param $fullCont string Resolved container name |
465 | 465 | * @param $dir string Resolved storage directory with no trailing slash |
— | — | @@ -653,7 +653,7 @@ |
654 | 654 | * |
655 | 655 | * @ingroup FileBackend |
656 | 656 | */ |
657 | | -class SwiftFileIterator implements Iterator { |
| 657 | +class SwiftFileBackendFileList implements Iterator { |
658 | 658 | /** @var Array */ |
659 | 659 | protected $bufferIter = array(); |
660 | 660 | protected $bufferAfter = null; // string; list items *after* this path |
— | — | @@ -668,11 +668,9 @@ |
669 | 669 | const PAGE_SIZE = 5000; // file listing buffer size |
670 | 670 | |
671 | 671 | /** |
672 | | - * Get an FSFileIterator from a file system directory |
673 | | - * |
674 | 672 | * @param $backend SwiftFileBackend |
675 | 673 | * @param $fullCont string Resolved container name |
676 | | - * @param $dir string Resolved relative directory |
| 674 | + * @param $dir string Resolved directory relative to container |
677 | 675 | */ |
678 | 676 | public function __construct( SwiftFileBackend $backend, $fullCont, $dir ) { |
679 | 677 | $this->backend = $backend; |
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -1052,7 +1052,7 @@ |
1053 | 1053 | wfDebug( __METHOD__ . ": iterating over all container shards.\n" ); |
1054 | 1054 | // File listing spans multiple containers/shards |
1055 | 1055 | list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] ); |
1056 | | - return new ContainerShardListIterator( $this, |
| 1056 | + return new FileBackendShardListIterator( $this, |
1057 | 1057 | $fullCont, $this->getContainerSuffixes( $shortCont ), $params ); |
1058 | 1058 | } |
1059 | 1059 | } |
— | — | @@ -1431,7 +1431,7 @@ |
1432 | 1432 | * |
1433 | 1433 | * @ingroup FileBackend |
1434 | 1434 | */ |
1435 | | -class ContainerShardListIterator implements Iterator { |
| 1435 | +class FileBackendShardListIterator implements Iterator { |
1436 | 1436 | /* @var FileBackend */ |
1437 | 1437 | protected $backend; |
1438 | 1438 | /* @var Array */ |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -485,14 +485,15 @@ |
486 | 486 | 'TempFSFile' => 'includes/filerepo/file/TempFSFile.php', |
487 | 487 | |
488 | 488 | # includes/filerepo/backend |
489 | | - 'ContainerShardListIterator' => 'includes/filerepo/backend/FileBackend.php', |
490 | 489 | 'FileBackendGroup' => 'includes/filerepo/backend/FileBackendGroup.php', |
491 | 490 | 'FileBackendBase' => 'includes/filerepo/backend/FileBackend.php', |
492 | 491 | 'FileBackend' => 'includes/filerepo/backend/FileBackend.php', |
493 | 492 | 'FileBackendMultiWrite' => 'includes/filerepo/backend/FileBackendMultiWrite.php', |
| 493 | + 'FileBackendShardListIterator' => 'includes/filerepo/backend/FileBackend.php', |
494 | 494 | 'FSFileBackend' => 'includes/filerepo/backend/FSFileBackend.php', |
| 495 | + 'FSFileBackendFileList' => 'includes/filerepo/backend/FSFileBackend.php', |
495 | 496 | 'SwiftFileBackend' => 'includes/filerepo/backend/SwiftFileBackend.php', |
496 | | - 'FSFileIterator' => 'includes/filerepo/backend/FSFileBackend.php', |
| 497 | + 'SwiftFileBackendFileList' => 'includes/filerepo/backend/SwiftFileBackend.php', |
497 | 498 | 'LockManagerGroup' => 'includes/filerepo/backend/lockmanager/LockManagerGroup.php', |
498 | 499 | 'LockManager' => 'includes/filerepo/backend/lockmanager/LockManager.php', |
499 | 500 | 'ScopedLock' => 'includes/filerepo/backend/lockmanager/LockManager.php', |