|
@@ 1045-1058 (lines=14) @@
|
| 1042 |
|
* @param array $paths List of virtual URLs or storage paths |
| 1043 |
|
* @return Status |
| 1044 |
|
*/ |
| 1045 |
|
public function quickPurgeBatch( array $paths ) { |
| 1046 |
|
$status = $this->newGood(); |
| 1047 |
|
$operations = []; |
| 1048 |
|
foreach ( $paths as $path ) { |
| 1049 |
|
$operations[] = [ |
| 1050 |
|
'op' => 'delete', |
| 1051 |
|
'src' => $this->resolveToStoragePath( $path ), |
| 1052 |
|
'ignoreMissingSource' => true |
| 1053 |
|
]; |
| 1054 |
|
} |
| 1055 |
|
$status->merge( $this->backend->doQuickOperations( $operations ) ); |
| 1056 |
|
|
| 1057 |
|
return $status; |
| 1058 |
|
} |
| 1059 |
|
|
| 1060 |
|
/** |
| 1061 |
|
* Pick a random name in the temp zone and store a file to it. |
|
@@ 1601-1609 (lines=9) @@
|
| 1598 |
|
* @return Status |
| 1599 |
|
* @since 1.27 |
| 1600 |
|
*/ |
| 1601 |
|
public function streamFileWithStatus( $virtualUrl, $headers = [], $optHeaders = [] ) { |
| 1602 |
|
$path = $this->resolveToStoragePath( $virtualUrl ); |
| 1603 |
|
$params = [ 'src' => $path, 'headers' => $headers, 'options' => $optHeaders ]; |
| 1604 |
|
|
| 1605 |
|
$status = $this->newGood(); |
| 1606 |
|
$status->merge( $this->backend->streamFile( $params ) ); |
| 1607 |
|
|
| 1608 |
|
return $status; |
| 1609 |
|
} |
| 1610 |
|
|
| 1611 |
|
/** |
| 1612 |
|
* Attempt to stream a file with the given virtual URL/storage path |