API16

JStream/writeFile

From Joomla! Documentation

< API16:JStream

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Writes a chunk of data to a file



Syntax[edit]

writeFile($filename, &$buffer)
Parameter Name Default Value Description
$filename
&$buffer

Defined in[edit]

libraries/joomla/filesystem/stream.php

Importing[edit]

jimport( 'joomla.filesystem.stream' );

Source Body[edit]

function writeFile($filename, &$buffer)
{
        if($this->open($filename, 'w'))
        {
                $result = $this->write($buffer);
                $this->chmod();
                $this->close();
                return $result;
        }
        return false;
}



Examples[edit]

Code Examples[edit]