Stream
in package
Table of Contents
Properties
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
$path
protected
mixed
$path
$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|floatclose()
Closes an open file pointer.
public
close() : bool
Return values
boolfilesize()
Returns the file size in bytes.
public
filesize() : int
Return values
intgetPath()
Get file path.
public
getPath() : string
Return values
stringgetResource()
Get file resource.
public
getResource() : resource
Return values
resourcemake()
Creates a new instance of Stream.
public
static make(string $path) : self
Parameters
- $path : string
Tags
Return values
selfread()
Reads a line from the file pointer.
public
read(int $bytes) : string|false
Parameters
- $bytes : int
Return values
string|falseseek()
Sets the file position indicator for the file pointer.
public
seek(int $offset) : int
Parameters
- $offset : int
Return values
inttell()
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