30 return [ [
'src' ], [
'headers' ], [
'src' ] ];
37 $status = StatusValue::newGood();
41 if ( $srcExists ===
false ) {
42 $status->fatal(
'backend-fail-notexists', $this->params[
'src'] );
45 } elseif ( $srcExists === FileBackend::EXISTENCE_ERROR ) {
46 $status->fatal(
'backend-fail-stat', $this->params[
'src'] );
52 $srcSize =
function () use ( $opPredicates ) {
54 $size ??= $this->
resolveFileSize( $this->params[
'src'], $opPredicates );
57 $srcSha1 =
function () use ( $opPredicates ) {
62 $batchPredicates->
assumeFileExists( $this->params[
'src'], $srcSize, $srcSha1 );
69 return $this->backend->describeInternal( $this->
setFlags( $this->params ) );
73 return [ $this->params[
'src'] ];
Change metadata for a file at the given storage path in the backend.
doPrecheck(FileStatePredicates $opPredicates, FileStatePredicates $batchPredicates)
Do a dry-run precondition check of the operation in the context of op batch.
storagePathsChanged()
Get a list of storage paths written to for this operation.
allowedParams()
Get the file operation parameters.
FileBackend helper class for representing operations.
resolveFileExistence( $source, FileStatePredicates $opPredicates)
Check if a file will exist in storage when this operation is attempted.
setFlags(array $params)
Adjust params to FileBackendStore internal file calls.
resolveFileSha1Base36( $source, FileStatePredicates $opPredicates)
Get the SHA-1 of a file in storage when this operation is attempted.
resolveFileSize( $source, FileStatePredicates $opPredicates)
Get the size a file in storage will have when this operation is attempted.
Helper class for tracking counterfactual file states when pre-checking file operation batches.
assumeFileExists(string $path, $size, $sha1Base36)
Predicate that a file exists at the path.