Documentation

FileContent

Interface for actual file contents.

Tags
since
1.3.0

Table of Contents

content()  : string
returns actual content
eof()  : bool
checks whether pointer is at end of file
read()  : string
reads the given amount of bytes from content
seek()  : bool
seeks to the given offset
size()  : int
returns size of content
truncate()  : bool
Truncates a file to a given length
write()  : int
writes an amount of data

Methods

content()

returns actual content

public content() : string
Return values
string

eof()

checks whether pointer is at end of file

public eof() : bool
Return values
bool

read()

reads the given amount of bytes from content

public read(int $count) : string
Parameters
$count : int
Return values
string

seek()

seeks to the given offset

public seek(int $offset, int $whence) : bool
Parameters
$offset : int
$whence : int
Return values
bool

size()

returns size of content

public size() : int
Return values
int

truncate()

Truncates a file to a given length

public truncate(int $size) : bool
Parameters
$size : int

length to truncate file to

Return values
bool

write()

writes an amount of data

public write(string $data) : int
Parameters
$data : string
Return values
int

amount of written bytes

Search results