---
title: "write(to:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mlwritable/write(to:)"
---

# write(to:)

Exports a machine learning file to the file system.

## Declaration

```swift
func write(to url: URL) throws
```

## Parameters

- `url`: The location in the file system where the file should be written.
