Truxton media get generated files folder id

From truxwiki.com
Jump to navigation Jump to search

This retrieves the GUID of the Generated Files folder in the media. This corresponds to the ID column of the File table.

Syntax

void truxton_media_get_generated_files_folder_id( uint64_t media_handle, char * destination_string, size_t max_size );

Parameters

media_handle

The handle created by the truxton_media_open_id or truxton_media_create call.

destination_string

The string to be written to.

max_size

The maximum number of characters that can be written to destination_string.

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 );
}