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; // Write out the empty tree sequence 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. Currently unused; should be set to zero to ensure compatibility with later versions of tskit. @return Return 0 on success or a negative value on failure.