Go to the documentation of this file.
32 [
'overwrite',
'overwriteSame',
'ignoreMissingSource',
'headers' ],
41 $srcExists = $this->
fileExists( $this->params[
'src'], $predicates );
42 if ( $srcExists ===
false ) {
43 if ( $this->
getParam(
'ignoreMissingSource' ) ) {
44 $this->doOperation =
false;
46 $predicates[
'exists'][$this->params[
'src']] =
false;
47 $predicates[
'sha1'][$this->params[
'src']] =
false;
51 $status->fatal(
'backend-fail-notexists', $this->params[
'src'] );
55 } elseif ( $srcExists === FileBackend::EXISTENCE_ERROR ) {
56 $status->fatal(
'backend-fail-stat', $this->params[
'src'] );
65 $predicates[
'exists'][$this->params[
'dst']] =
true;
73 if ( $this->overwriteSameCase ) {
75 } elseif ( $this->params[
'src'] === $this->params[
'dst'] ) {
77 $headers = $this->
getParam(
'headers' ) ?: [];
79 'src' => $this->params[
'dst'],
'headers' => $headers
83 $status = $this->backend->copyInternal( $this->
setFlags( $this->params ) );
90 return [ $this->params[
'src'] ];
94 return [ $this->params[
'dst'] ];
FileBackend helper class for representing operations.
Copy a file from one storage path to another in the backend.
allowedParams()
Get the file operation parameters.
setFlags(array $params)
Adjust params to FileBackendStore internal file calls.
doPrecheck(array &$predicates)
getParam( $name)
Get the value of the parameter with the given name.
static newGood( $value=null)
Factory function for good results.
storagePathsRead()
Get a list of storage paths read from for this operation.
storagePathsChanged()
Get a list of storage paths written to for this operation.
fileExists( $source, array $predicates)
Check if a file will exist in storage when this operation is attempted.
precheckDestExistence(array $predicates)
Check for errors with regards to the destination file already existing.