libdarts_sys

Function darts_open

source
pub unsafe extern "C" fn darts_open(
    darts: DartsT,
    file_name: *const c_char,
    mode: *const c_char,
    offset: size_t,
    size: size_t,
) -> c_int
Expand description

Reads an array of units from the specified file. And if it goes well, the old array will be freed and replaced with the new array read from the file. offset specifies the number of bytes to be skipped before reading an array. size specifies the number of bytes to be read from the file. If the `size’ is 0, the whole file will be read.

Returns 0 iff the operation succeeds. Otherwise, get error message from darts_error.