---
title: "write(toDirectory:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mldatatable/write(todirectory:)"
---

# write(toDirectory:)

Exports a binary file of the data table to the given directory path.

## Declaration

```swift
func write(toDirectory path: String) throws
```

## Parameters

- `path`: A file system directory path where the data table file should be written.

## See Also

### Saving a data table

- [write(to:)](createml/mldatatable/write(to:).md)
- [writeCSV(to:)](createml/mldatatable/writecsv(to:).md)
- [writeCSV(toFile:)](createml/mldatatable/writecsv(tofile:).md)
