---
title: "write(to:atomically:)"
framework: Core Image
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: "coreimage/cifiltergenerator/write(to:atomically:)"
---

# write(to:atomically:)

Archives a filter generator object to a filter generator file.

## Declaration

```swift
func write(to aURL: URL, atomically flag: Bool) -> Bool
```

## Parameters

- `aURL`: A location for the file generator file.
- `flag`: Pass true to specify that Core Image should create an interim file to avoid overwriting an existing file.

## Return Value

Return Value Returns true if the object is successfully archived to the file.

## Discussion

Discussion Use this method to save your filter chain to a file for later use.
