# IgnoreMode

Determines the ignore behavior to use.

- Source: [`core/lib/fs/options.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/core/lib/fs/options.ts#L49)

## Example

```ts
new lambda.Function(this, 'Function', {
  code: lambda.Code.fromAsset(path.join(__dirname, 'my-python-handler'), {
    exclude: ['*.ignore'],
    ignoreMode: IgnoreMode.DOCKER, // Default is IgnoreMode.GLOB
  }),
  runtime: lambda.Runtime.PYTHON_3_9,
  handler: 'index.handler',
});
```

## Members

| Member | Description |
| --- | --- |
| `GLOB` | Ignores file paths based on simple glob patterns. |
| `GIT` | Ignores file paths based on the [`.gitignore specification`](https://git-scm.com/docs/gitignore). |
| `DOCKER` | Ignores file paths based on the [`.dockerignore specification`](https://docs.docker.com/engine/reference/builder/#dockerignore-file). |

## Referenced by

- [`CopyOptions`](/v2/docs/aws-cdk-lib.CopyOptions).ignoreMode
- [`FileCopyOptions`](/v2/docs/aws-cdk-lib.FileCopyOptions).ignoreMode
