Truxton file create child
Revision as of 09:14, 6 June 2020 by Sam (talk | contribs) (Created page with "This will create a new child file object in Truxton that is a child of the current file. That child will not exist in the database until <code>truxton_child_file_save()</c...")
This will create a new child file object in Truxton that is a child of the current file.
That child will not exist in the database until truxton_child_file_save() is called.
Syntax
uint64_t truxton_file_create_child( uint64_t file_handle );
Parameters
file_handle
The handle created by the truxton_file_open_id or truxton_file_open_md5 call.
Return value
The a child file object handle.
Sample
int print_id(uint64_t truxton)
{
uint64_t file = truxton_file_open_md5(truxton, "9ec8fb6095c35eff2b236863b7caaf10");
if ( file != 0 )
{
return(0);
}
uint64_t child = truxton_file_create_child( file );
truxton_child_file_set_name( child, "Sam" );
truxton_child_file_save( child );
}