Truxton media add child
Revision as of 08:40, 26 July 2020 by Sam (talk | contribs) (Created page with "This creates a new child file belonging to this media. This new child will be an orphan. You must set the Truxton_child_file_set_parent_id|pare...")
This creates a new child file belonging to this media. This new child will be an orphan. You must set the parent file id in order to have it show up in the file hierarchy.
Syntax
uint64_t truxton_media_add_child( uint64_t media_handle );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
Return value
The handle to a new orphaned child file object belonging to this media.
Sample
uint64_t make_new_generated_file(uint64_t media)
{
char guid_string[ 40 ];
truxton_media_get_generated_files_folder_id( media, guid_string, sizeof(guid_string));
uint64_t child_file = truxton_media_add_child( media )
truxton_child_file_set_parent_id( child_file, guid_string );
return( child_file );
}