Function eccodes_sys::codes_grib_handle_new_from_file[][src]

pub unsafe extern "C" fn codes_grib_handle_new_from_file(
    c: *mut codes_context,
    f: *mut FILE,
    error: *mut c_int
) -> *mut codes_handle
Expand description

Create a GRIB handle from a file resource. The file is read until a GRIB message is found. The message is then copied. Remember always to delete the handle when it is not needed anymore to avoid memory leaks.

@param c : the context from which the handle will be created (NULL for default context) @param f : the file resource @param error : error code set if the returned handle is NULL and the end of file is not reached @return the new handle, NULL if the resource is invalid or a problem is encountered