<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilterGenerator/write(to:atomically:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilterGenerator(im)writeToURL:atomically:"
  },
  "title" : "write(to:atomically:)"
}
-->

# write(to:atomically:)

Archives a filter generator object to a filter generator file.

```
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

Returns `true` if the object is successfully archived to the file.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)