Amp\File\BlockingHandle classBlockingHandle implementsAmp\File\Handle

Summary

Properties

Methods

Properties

Methods

__construct —public function__construct(resource$fh,$path,$mode)
No documentation.
Type Parameter Description Default Value
resource $fh An open uv filesystem descriptor none
mixed $path No documentation. none
mixed $mode No documentation. none
read —public functionread(int$len)

Read $len bytes from the open file handle starting at $offset

Type Parameter Description Default Value
int $len No documentation. none
write —public functionwrite(string$data)

Write $data to the open file handle starting at $offset

Type Parameter Description Default Value
string $data No documentation. none
close —public functionclose()

Close the file handle

Applications are not required to manually close handles -- they will be unloaded automatically when the object is garbage collected.

seek —public functionseek(int$position,int$whence =\SEEK_SET)

Set the handle's internal pointer position

$whence values:

SEEK_SET - Set position equal to offset bytes. SEEK_CUR - Set position to current location plus offset. SEEK_END - Set position to end-of-file plus offset.

Type Parameter Description Default Value
int $position No documentation. none
int $whence No documentation. \SEEK_SET
tell —public functiontell()

Return the current internal offset position of the file handle

eof —public functioneof()

Test for "end-of-file" on the file handle

path —public functionpath()

Retrieve the path used when opening the file handle

mode —public functionmode()

Retrieve the mode used when opening the file handle