Function tskit::bindings::tsk_table_collection_dump[][src]

pub unsafe extern "C" fn tsk_table_collection_dump(
    self_: *const tsk_table_collection_t,
    filename: *const c_char,
    options: tsk_flags_t
) -> c_int
Expand description

@brief Write a table collection to file.

@rst Writes the data from this table collection to the specified file.

If an error occurs the file path is deleted, ensuring that only complete and well formed files will be written.

Examples**

.. code-block:: c

int ret; tsk_table_collection_t tables;

ret = tsk_table_collection_init(&tables, 0); error_check(ret); tables.sequence_length = 1.0; ret = tsk_table_collection_dump(&tables, “empty.trees”, 0); error_check(ret);

@endrst

@param self A pointer to an initialised tsk_table_collection_t object. @param filename A NULL terminated string containing the filename. @param options Bitwise options. See above for details. @return Return 0 on success or a negative value on failure.