API16

JStream/writeFile

From Joomla! Documentation

< API16:JStream
Revision as of 05:12, 30 March 2010 by Doxiki (talk | contribs)

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

[Edit Descripton]

Template:Description:JStream/writeFile

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;
}

[Edit See Also] Template:SeeAlso:JStream/writeFile

Examples[edit]

<CodeExamplesForm />