public function beforeCreateFile($uri, $data, ICollection $parent, $modified)
    {
        if ($tempPath = $this->isTempFile($uri)) {
            $hR = $this->server->httpResponse;
            $hR->setHeader('X-Sabre-Temp', 'true');
            file_put_contents($tempPath, $data);

            return false;
        }

        return;
    }
public function beforeCreateFile($uri, $data, ICollection $parent, $modified)
    {
        if ($tempPath = $this->isTempFile($uri)) {
            $hR = $this->server->httpResponse;
            $hR->setHeader('X-Sabre-Temp', 'true');
            file_put_contents($tempPath, $data);

            return false;
        }

        return;
    }
public function beforeCreateFile ( $ uri , $ data , ICollection $ parent , $ modified ) { if ( $ tempPath = $ this -> isTempFile ( $ uri ) ) { $ hR = $ this -> server -> httpResponse ; $ hR -> setHeader ( 'X-Sabre-Temp' , 'true' ) ; file_put_contents ( $ tempPath , $ data ) ; return false ; } return ; }
This method is invoked if some subsystem creates a new file.

This is used to deal with HTTP LOCK requests which create a new
file.

@param string      $uri
@param resource    $data
@param ICollection $parent
@param bool        $modified should be set to true, if this event handler
changed &$data

@return bool
This method is invoked if some subsystem creates a new file .