Documentation

SeekableFileContent
in package
implements FileContent

Default implementation for file contents based on simple strings.

Tags
since
1.3.0

Interfaces, Classes and Traits

FileContent
Interface for actual file contents.

Table of Contents

$offset  : mixed
current position within content
bytesRead()  : int
for backwards compatibility with vfsStreamFile::bytesRead()
eof()  : bool
checks whether pointer is at end of file
read()  : string
reads the given amount of bytes from content
readUntilEnd()  : string
for backwards compatibility with vfsStreamFile::readUntilEnd()
seek()  : bool
seeks to the given offset
write()  : int
writes an amount of data
doRead()  : mixed
actual reading of given byte count starting at given offset
doWrite()  : mixed
actual writing of data with specified length at given offset

Properties

Methods

bytesRead()

for backwards compatibility with vfsStreamFile::bytesRead()

public bytesRead() : int
Tags
deprecated
Return values
int

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

readUntilEnd()

for backwards compatibility with vfsStreamFile::readUntilEnd()

public readUntilEnd() : string
Tags
deprecated
Return values
string

seek()

seeks to the given offset

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

write()

writes an amount of data

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

amount of written bytes

doRead()

actual reading of given byte count starting at given offset

protected abstract doRead(int $offset, int $count) : mixed
Parameters
$offset : int
$count : int
Return values
mixed

doWrite()

actual writing of data with specified length at given offset

protected abstract doWrite(string $data, int $offset, int $length) : mixed
Parameters
$data : string
$offset : int
$length : int
Return values
mixed

Search results