A file stream object.

package filicious-core
author Christian Schiffler
author Tristan Lins
author Oliver Hoff

 Methods

Retrieve the underlaying resource

cast(int $as) : resource | boolean

Parameters

$as

int

Returns

resourceboolean

Close an resource

close() : bool

Returns

bool

Tests for end-of-file on a file pointer

eof() : boolean

Returns

boolean

Flushes the output

flush() : boolean

Returns

boolean

getResource()

getResource() : resource

Returns

resource

Advisory file locking

lock(\Filicious\mode $operation) : bool

Parameters

$operation

\Filicious\mode

Returns

bool

Opens file or URL

open(\Filicious\Stream\StreamMode $mode) : bool

Parameters

$mode

Returns

bool

Read from stream

read(int $count) : string

Parameters

$count

int

Returns

string

Seeks to specific location in a stream

seek(int $offset, int $whence) : mixed

Parameters

$offset

int

$whence

int

Returns

mixed

Retrieve information about a file resource

stat() : array

Returns

array

Retrieve the current position of a stream

tell() : int

Returns

int

Truncate stream

truncate(int $size) : boolean

Parameters

$size

int

Returns

boolean

Write to stream

write(string $data) : mixed

Parameters

$data

string

Returns

mixed