---
title: "write(to:metadata:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mlgazetteer/write(to:metadata:)"
---

# write(to:metadata:)

Exports the gazetteer as a Core ML model file at the specified URL.

## Declaration

```swift
func write(to fileURL: URL, metadata: MLModelMetadata? = nil) throws
```

## Parameters

- `fileURL`: The location in the file system to which the file should be written.
- `metadata`: Descriptive information to include with the exported model file.

## See Also

### Saving a gazetteer

- [write(toFile:metadata:)](createml/mlgazetteer/write(tofile:metadata:).md)
