public function prepend($file, $content)
    {
        $remote_file_content = $this->get($file);

        $stream = fopen('php://temp', 'r+');
        fwrite($stream, $content);
        fwrite($stream, $remote_file_content);
        rewind($stream);

        // We prevent ftp_fput from seeking local "file" ($h)
        ftp_set_option($this->getConnection(), FTP_AUTOSEEK, false);

        $result = $this->writeStream($file, $stream);

        fclose($stream);

        return $result;
    }
public function prepend($file, $content)
    {
        $remote_file_content = $this->get($file);

        $stream = fopen('php://temp', 'r+');
        fwrite($stream, $content);
        fwrite($stream, $remote_file_content);
        rewind($stream);

        // We prevent ftp_fput from seeking local "file" ($h)
        ftp_set_option($this->getConnection(), FTP_AUTOSEEK, false);

        $result = $this->writeStream($file, $stream);

        fclose($stream);

        return $result;
    }
public function prepend ( $ file , $ content ) { $ remote_file_content = $ this -> get ( $ file ) ; $ stream = fopen ( 'php://temp' , 'r+' ) ; fwrite ( $ stream , $ content ) ; fwrite ( $ stream , $ remote_file_content ) ; rewind ( $ stream ) ; // We prevent ftp_fput from seeking local "file" ($h) ftp_set_option ( $ this -> getConnection ( ) , FTP_AUTOSEEK , false ) ; $ result = $ this -> writeStream ( $ file , $ stream ) ; fclose ( $ stream ) ; return $ result ; }
Write to the beginning of a file specify

@param  string $file
@param  string $content
@return bool
@throws
Write to the beginning of a file specify