Documentation

Stream
in package

Table of Contents

Properties

$path  : mixed
$resource  : mixed

Methods

binaryToDecimal()  : int|float
Reads a 32-bit unsigned integer from the current position of the file read pointer.
close()  : bool
Closes an open file pointer.
filesize()  : int
Returns the file size in bytes.
getPath()  : string
Get file path.
getResource()  : resource
Get file resource.
make()  : self
Creates a new instance of Stream.
read()  : string|false
Reads a line from the file pointer.
seek()  : int
Sets the file position indicator for the file pointer.
tell()  : int
Returns the current position of the file read/write pointer.
__construct()  : mixed

Properties

$resource

protected mixed $resource

Methods

binaryToDecimal()

Reads a 32-bit unsigned integer from the current position of the file read pointer.

public binaryToDecimal(mixed $bytes) : int|float
Parameters
$bytes : mixed
Return values
int|float

close()

Closes an open file pointer.

public close() : bool
Return values
bool

filesize()

Returns the file size in bytes.

public filesize() : int
Return values
int

getPath()

Get file path.

public getPath() : string
Return values
string

getResource()

Get file resource.

public getResource() : resource
Return values
resource

make()

Creates a new instance of Stream.

public static make(string $path) : self
Parameters
$path : string
Tags
throws
Exception
Return values
self

read()

Reads a line from the file pointer.

public read(int $bytes) : string|false
Parameters
$bytes : int
Return values
string|false

seek()

Sets the file position indicator for the file pointer.

public seek(int $offset) : int
Parameters
$offset : int
Return values
int

tell()

Returns the current position of the file read/write pointer.

public tell() : int
Return values
int

__construct()

protected __construct(mixed $path, mixed $resource) : mixed
Parameters
$path : mixed
$resource : mixed

        
On this page

Search results