A file containing arbitrary text.

A text file may be manipulated, in contrast to a \FeaturePhp\File\StoredFile. In particular, it may not be used for binary data such as images.

package Default
inherited_from \FeaturePhp\File\File

 Methods

Creates a text file.

__construct(string $fileTarget, string $content = null
inherited_from \FeaturePhp\File\File::__construct()

Parameters

$fileTarget

string

$content

string

initial content of the file

Creates a file.

__construct(string $fileTarget) 
Inherited

Parameters

$fileTarget

string

Appends text content to the file.

append(string $content) 

Parameters

$content

string

Returns the text file's content.

getContent() : \FeaturePhp\File\TextFileContent
inherited_from \FeaturePhp\File\File::getContent()

Returns

\FeaturePhp\File\TextFileContent

Returns the file's content.

getContent() : \FeaturePhp\File\FileContent
Inherited

Returns

\FeaturePhp\File\FileContent

Returns the file's target.

getTarget() : string
Inherited

Returns

string

 Properties

 

the content as text (usually UTF-8)

$content : string

Default

 

the file target in the generated product

$fileTarget : string

Default