# system/io/FileWriter.php

## \FileWriter
jump to top

Package: phing\system\io

Convenience class for performing file write operations.

Unlike the Java counterpart, this class does not (yet) handle character set transformations. This will be an important function of this class with move to supporting PHP6.

Parent(s)
  \OutputStreamWriter < \Writer

### Properties

`\OutputStream $outStream= ''`
inherited

Inherited from: \OutputStreamWriter::$outStream
Details

Type
  \OutputStream
Inherited_from
  \OutputStreamWriter::$outStream

### Methods

`__construct( mixed $file, boolean $append = false ) : void`

Construct a new FileWriter.

Parameters

Name | Type | Description
--- | --- | ---
$file | mixed | PhingFile or string pathname.
$append | boolean | Append to existing file?

`close( ) : void`
inherited

Close the stream.

Inherited from: \OutputStreamWriter::close()
Throws

Exception | Description
--- | ---
\IOException | - if there is an error closing stream.

`flush( ) : void`
inherited

Flush output to the stream.

Inherited from: \OutputStreamWriter::flush()
`getResource( ) : string`
inherited

Gets a string representation of attached stream resource.

Inherited from: \OutputStreamWriter::getResource()
Returns

Type | Description
--- | ---
string | String representation of output stream

`write( \unknown_type $buf, \unknown_type $off = null, \unknown_type $len = null ) : \unknown`
inherited

Write char data to stream.

Inherited from: \OutputStreamWriter::write()
Parameters

Name | Type | Description
--- | --- | ---
$buf | \unknown_type |
$off | \unknown_type |
$len | \unknown_type |

Returns

Type | Description
--- | ---
\unknown |

Documentation was generated by DocBlox 0.15.1.