library/Garp/Content/Db/Server/Remote.php
public function store($path, &$data) {
        $ssh = $this->getSshSession();
        $sftp = ssh2_sftp($ssh);

        $sftpStream = @fopen('ssh2.sftp://' . $sftp . $path, 'wb');

        if (!$sftpStream) {
            throw new Exception("Could not open remote file: $path");
        }

        if (@fwrite($sftpStream, $data) === false) {
            throw new Exception("Could not store {$path} by SFTP on " . $this->getEnvironment());
        }

        fclose($sftpStream);
        return true;
    }
public function store($path, &$data) {
        $ssh = $this->getSshSession();
        $sftp = ssh2_sftp($ssh);

        $sftpStream = @fopen('ssh2.sftp://' . $sftp . $path, 'wb');

        if (!$sftpStream) {
            throw new Exception("Could not open remote file: $path");
        }

        if (@fwrite($sftpStream, $data) === false) {
            throw new Exception("Could not store {$path} by SFTP on " . $this->getEnvironment());
        }

        fclose($sftpStream);
        return true;
    }
public function store ( $ path , & $ data ) { $ ssh = $ this -> getSshSession ( ) ; $ sftp = ssh2_sftp ( $ ssh ) ; $ sftpStream = @ fopen ( 'ssh2.sftp://' . $ sftp . $ path , 'wb' ) ; if ( ! $ sftpStream ) { throw new Exception ( "Could not open remote file: $path" ) ; } if ( @ fwrite ( $ sftpStream , $ data ) === false ) { throw new Exception ( "Could not store {$path} by SFTP on " . $ this -> getEnvironment ( ) ) ; } fclose ( $ sftpStream ) ; return true ; }
Stores data in a file.
@param String $path Absolute path within the server to a file where the data should be stored.
@param String &$data The data to store.
@return Boolean      Success status of the storage process.
Stores data in a file .