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

C/C++ API Documentation | 2025.2

# ClientApi::GetIgnoreFile()

Get the full path name of the ignore file used for the current connection.

Virtual? | No |
Class | `ClientApi` |
Arguments | None |
Returns | `const StrPtr &` | a reference to the path of the ignore file.

## Notes

See `GetClient()` for more about the `StrPtr` return value.

If the `P4IGNORE` is unset, `GetIgnoreFile()` returns an uninitialized `StrPtr`.

## See also

- `ClientApi::DefineIgnoreFile()`

- `ClientApi::GetIgnore()`

- `ClientApi::SetIgnoreFile()`

## Example

This example demonstrates the use of `GetIgnoreFile()`.

Copy

    # include "clientapi.h"

    int main()
    {
        ClientApi client;
        printf( "The current ignore file is '%s'\n",
                client.GetIgnoreFile().Text() );
    }

Executing the preceding code produces output similar to the following:

    The current ignore file is .p4ignore

Your search for returned results