src/Stream.php
public function writeFile($filename, &$buffer, $appendToFile = false)
	{
		$fileMode = 'w';

		// Switch the filemode when we want to append to the file
		if ($appendToFile)
		{
			$fileMode = 'a';
		}

		if ($this->open($filename, $fileMode))
		{
			$result = $this->write($buffer);
			$this->chmod();
			$this->close();

			return $result;
		}

		return false;
	}
public function writeFile($filename, &$buffer, $appendToFile = false)
	{
		$fileMode = 'w';

		// Switch the filemode when we want to append to the file
		if ($appendToFile)
		{
			$fileMode = 'a';
		}

		if ($this->open($filename, $fileMode))
		{
			$result = $this->write($buffer);
			$this->chmod();
			$this->close();

			return $result;
		}

		return false;
	}
public function writeFile ( $ filename , & $ buffer , $ appendToFile = false ) { $ fileMode = 'w' ; // Switch the filemode when we want to append to the file if ( $ appendToFile ) { $ fileMode = 'a' ; } if ( $ this -> open ( $ filename , $ fileMode ) ) { $ result = $ this -> write ( $ buffer ) ; $ this -> chmod ( ) ; $ this -> close ( ) ; return $ result ; } return false ; }
Writes a chunk of data to a file.

@param   string   $filename      The file name.
@param   string   $buffer        The data to write to the file.
@param   boolean  $appendToFile  Append to the file and not overwrite it.

@return  boolean

@since   1.0
Writes a chunk of data to a file .