Truxton file path exists

From truxwiki.com
Jump to navigation Jump to search

Tests to see if a file with a given path exists in Truxton.

Syntax

int truxton_file_path_exists( uint64_t truxton_handle, char const* media_id_guid, char const * file_path);

Parameters

truxton_handle

The handle created by the truxton_create.

media_id_guid

The string representation of a globally unique identifier of the media that contains this path.

file_path

The exact path to the file.

Return value

It will return 1 if the file exists, 0 if it does not exist.

Sample

void print_it( uint64_t truxton )
{
   uint64_t exists = truxton_file_path_exists( truxton, "31bb46e2-b530-577a-ac00-6901ec2678fe", "Root\\463573448-Flynn-Calls-1.pdf\\Test.txt" );

   if ( exists != 0 )
   {
      printf( "It exists!\n" );
      return;
   }

   printf( "It does not exists.\n" );
}