Difference between revisions of "Truxton file free"
Jump to navigation
Jump to search
| Line 10: | Line 10: | ||
The handle created by the [[truxton_file_open_id]] or [[truxton_file_open_md5]] call. | The handle created by the [[truxton_file_open_id]] or [[truxton_file_open_md5]] call. | ||
After this call, the <code>file_handle</code> is no longer valid. | After this call, the <code>file_handle</code> is no longer valid. | ||
| + | |||
| + | =Remarks= | ||
| + | If the file's contents were opened for reading, [[truxton_file_close]] will automatically be called. | ||
=Sample= | =Sample= | ||
| − | <source lang="C" highlight=" | + | <source lang="C" highlight="10"> |
int check_it(uint64_t truxton) | int check_it(uint64_t truxton) | ||
{ | { | ||
| Line 22: | Line 25: | ||
} | } | ||
| − | |||
truxton_file_free(file); | truxton_file_free(file); | ||
Revision as of 18:50, 11 December 2020
Closes and frees any resources associated with a Truxton file object.
Contents
Syntax
void truxton_file_free( uint64_t file_handle );
Parameters
file_handle
The handle created by the truxton_file_open_id or truxton_file_open_md5 call.
After this call, the file_handle is no longer valid.
Remarks
If the file's contents were opened for reading, truxton_file_close will automatically be called.
Sample
int check_it(uint64_t truxton)
{
uint64_t file = truxton_file_open_id(truxton, "5ed3aeb7-3da4-5f5c-8c8f-af5200000000");
if ( file != 0 )
{
return(0);
}
truxton_file_free(file);
return(1)
}