30 return [ [
'src' ], [
'ignoreMissingSource' ], [
'src' ] ];
34 $status = StatusValue::newGood();
37 $srcExists = $this->
fileExists( $this->params[
'src'], $predicates );
38 if ( $srcExists ===
false ) {
39 if ( $this->
getParam(
'ignoreMissingSource' ) ) {
40 $this->doOperation =
false;
42 $predicates[
'exists'][$this->params[
'src']] =
false;
43 $predicates[
'sha1'][$this->params[
'src']] =
false;
47 $status->fatal(
'backend-fail-notexists', $this->params[
'src'] );
51 } elseif ( $srcExists === FileBackend::EXISTENCE_ERROR ) {
52 $status->fatal(
'backend-fail-stat', $this->params[
'src'] );
57 $predicates[
'exists'][$this->params[
'src']] =
false;
58 $predicates[
'sha1'][$this->params[
'src']] =
false;
65 return $this->backend->deleteInternal( $this->
setFlags( $this->params ) );
69 return [ $this->params[
'src'] ];
Delete a file at the given storage path from the backend.
allowedParams()
Get the file operation parameters.
storagePathsChanged()
Get a list of storage paths written to for this operation.
doPrecheck(array &$predicates)
FileBackend helper class for representing operations.
fileExists( $source, array $predicates)
Check if a file will exist in storage when this operation is attempted.
getParam( $name)
Get the value of the parameter with the given name.
setFlags(array $params)
Adjust params to FileBackendStore internal file calls.