Documentation

Swift_FileStream extends Swift_OutputByteStream

An OutputByteStream which specifically reads from a file.

Tags
author

Chris Corbyn

Table of Contents

getPath()  : string
Get the complete path to the file.
read()  : string|bool
Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.
setReadPointer()  : bool
Move the internal read pointer to $byteOffset in the stream.

Methods

getPath()

Get the complete path to the file.

public getPath() : string
Return values
string

read()

Reads $length bytes from the stream into a string and moves the pointer through the stream by $length.

public read(int $length) : string|bool

If less bytes exist than are requested the remaining bytes are given instead. If no bytes are remaining at all, boolean false is returned.

Parameters
$length : int
Tags
throws
Swift_IoException
Return values
string|bool

setReadPointer()

Move the internal read pointer to $byteOffset in the stream.

public setReadPointer(int $byteOffset) : bool
Parameters
$byteOffset : int
Tags
throws
Swift_IoException
Return values
bool

Search results