Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2026.1

# ClientApi::SetTrustFile( const char *c )

Sets the location of the trustfile using the full pathname to the file and not a directory.

Virtual? | No |
Class | `ClientApi` |
Arguments | `const char *c` | the full path name of the new trust file
Returns | `void` |

## Notes

`SetTtrustFile()` does not permanently set the `P4TRUST` value in the environment or registry. The new setting applies only to commands executed by calling this `ClientApi` object’s `Run()` method.

## Example

The following example sets a trust file location by calling `SetTrustFile()`.

    ClientApi client;
    StrBuf sb;

    sb = "/tmp/trustfile.txt";
    client.SetTrustFile( &sb );

Your search for returned results