Method: f::write

Creates a new file

Info

Syntax

f::write($file, $content, $append=false)

Parameters

Return (boolean)

Example


f::write('test.txt', 'hello');
// creates a new text file with hello as content

// create a new file
f::write('text.txt', array('test' => 'hello'));
// creates a new file and encodes the array as json