Class MOXMAN_Vfs_Local_FileStream

InheritanceMOXMAN_Vfs_Local_FileStream
ImplementsMOXMAN_Vfs_IFileStream

This class handles the stream for the local file system.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() MOXMAN_Vfs_Local_FileStream
close() Closes the specified stream. This will first flush the stream before closing. MOXMAN_Vfs_Local_FileStream
flush() Flush buffered data out to stream. MOXMAN_Vfs_Local_FileStream
read() Reads the specified number of bytes and returns an string with data. MOXMAN_Vfs_Local_FileStream
readToEnd() Reads all data avaliable in a stream and returns it as a string. MOXMAN_Vfs_Local_FileStream
skip() Skip/jump over specified number of bytes from stream. MOXMAN_Vfs_Local_FileStream
write() Writes a string to a stream. MOXMAN_Vfs_Local_FileStream

Method Details

__construct() public method

public void __construct ( $internalPath, $mode )
$internalPath
$mode
close() public method

Closes the specified stream. This will first flush the stream before closing.

public void close ( )
flush() public method

Flush buffered data out to stream.

public void flush ( )
read() public method

Reads the specified number of bytes and returns an string with data.

public string read ( $len 1024 )
$len int

Number of bytes to read, defaults to 1024.

return string

Data read from stream or null if it's at the end of stream.

readToEnd() public method

Reads all data avaliable in a stream and returns it as a string.

public string readToEnd ( )
return string

All data read from stream.

skip() public method

Skip/jump over specified number of bytes from stream.

public int skip ( $bytes )
$bytes int

Number of bytes to skip.

return int

Number of skipped bytes.

write() public method

Writes a string to a stream.

public void write ( $buff, $len = -1 )
$buff string

String buffer to write to file.

$len int

Number of bytes from string to write.