Commit a25595f
committed
Add $offset param to uv_fs_read() to allow seeking on open handles
This change modifies the uv_fs_read() function signature slightly by adding
a new $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(resoruce $loop, zval $fd, long $length, callable $callback)
New:
uv_fs_read(resoruce $loop, zval $fd, long $offest, long $length, callable $callback)
This change represents a minor BC break for existing code using uv_fs_read().1 parent 5817bfe commit a25595f
3 files changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2180 | 2180 | | |
2181 | 2181 | | |
2182 | 2182 | | |
2183 | | - | |
| 2183 | + | |
2184 | 2184 | | |
2185 | 2185 | | |
2186 | 2186 | | |
| |||
2192 | 2192 | | |
2193 | 2193 | | |
2194 | 2194 | | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
2195 | 2199 | | |
2196 | 2200 | | |
2197 | 2201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
954 | | - | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
958 | | - | |
| 959 | + | |
959 | 960 | | |
960 | 961 | | |
961 | 962 | | |
| |||
3023 | 3024 | | |
3024 | 3025 | | |
3025 | 3026 | | |
| 3027 | + | |
3026 | 3028 | | |
3027 | 3029 | | |
3028 | 3030 | | |
| |||
5713 | 5715 | | |
5714 | 5716 | | |
5715 | 5717 | | |
5716 | | - | |
| 5718 | + | |
5717 | 5719 | | |
5718 | 5720 | | |
5719 | 5721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments