k2hpx_da_get_read_offset k2hash Functions k2hpx_da_get_value

k2hpx_da_get_value_to_file

Reads value using the offset and write it to the file

Description

bool k2hpx_da_get_value_to_file ( mixed $dahandle_res , string $filepath [, int $length [, int $offset ]] )

Reads value using the offset and write it to the file.

Note

The k2hash direct access handle is a handler to provide quick access to the specific part of large data using offset.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php
$handle = k2hpx_open_mem();
k2hpx_set_value($handle, "test", "value");
$dahandle = k2hpx_da_get_handle_rw($handle, "test");
var_dump(k2hpx_da_get_value_to_file($dahandle, "/tmp/test_k2hash_da_get_value", 5));
k2hpx_da_free($dahandle);
k2hpx_close($handle);
?>

The above example will output:

bool(true)

See Also

k2hpx_da_get_read_offset k2hash Functions k2hpx_da_get_value