Webiny\Component\Storage\Driver\DriverInterface::setContents PHP Method

setContents() public method

Writes the given File
public setContents ( $key, $contents, boolean $append = false ) : boolean | integer
$key
$contents
$append boolean
return boolean | integer The number of bytes that were written into the file
    public function setContents($key, $contents, $append = false);

Usage Example

Example #1
0
 /**
  * Writes the given contents into the file
  *
  * @param string $key
  * @param string $contents
  *
  * @param bool   $append
  *
  * @return bool|int The number of bytes that were written into the file
  */
 public function setContents($key, $contents, $append = false)
 {
     return $this->driver->setContents($key, $contents, $append);
 }