php-uv
php-uv copied to clipboard
Add uv_fs_read() $offset param allowing seeking on open handles
This PR modifies uv_fs_read() with a new long $offset parameter. This allows the same file handle to be reused for multiple reads. Previously the only way to access a section of a file that had already been read was to open a new handle.
Old:
uv_fs_read(resource $loop, zval $fd, long $length, callable $callback)
New:
uv_fs_read(resource $loop, zval $fd, long $offset, long $length, callable $callback)
This change represents a minor BC break for existing code using uv_fs_read().
+1!
LOL! Didn't notice that but your right, I agree - consistency in that regard makes sense.
Hope you dont mind but I merged this PR into the libuv 1.0 WIP.
Yeah that's no problem @steverhoades ...
Pinging @chobie to see if we can get this PR merged. I know he's busy ... I'm forced to ignore PRs for long periods sometimes because of other work too :)
@chobie How do you feel about merging this?