Go to the documentation of this file.
30 [
'overwrite',
'overwriteSame',
'headers' ],
39 $maxBytes = $this->backend->maxFileSizeInternal();
40 if ( strlen( $this->
getParam(
'content' ) ) > $maxBytes ) {
41 $status->fatal(
'backend-fail-maxsize', $this->params[
'dst'], $maxBytes );
48 if ( $status->isOK() ) {
50 $predicates[
'exists'][$this->params[
'dst']] =
true;
58 if ( $this->overwriteSameCase ) {
62 $status = $this->backend->createInternal( $this->
setFlags( $this->params ) );
69 return Wikimedia\base_convert( sha1( $this->params[
'content'] ), 16, 36, 31 );
73 return [ $this->params[
'dst'] ];
FileBackend helper class for representing operations.
setFlags(array $params)
Adjust params to FileBackendStore internal file calls.
getSourceSha1Base36()
precheckDestExistence() helper function to get the source file SHA-1.
getParam( $name)
Get the value of the parameter with the given name.
doPrecheck(array &$predicates)
allowedParams()
Get the file operation parameters.
static newGood( $value=null)
Factory function for good results.
storagePathsChanged()
Get a list of storage paths written to for this operation.
precheckDestExistence(array $predicates)
Check for errors with regards to the destination file already existing.
Create a file in the backend with the given content.