<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/URLDocumentConfiguration/makeFileCoordinator()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI24URLDocumentConfigurationC19makeFileCoordinatorSo06NSFileG0CyF"
  },
  "title" : "makeFileCoordinator()"
}
-->

# makeFileCoordinator()

Creates a file coordinator for coordinated disk access
outside the normal read/write flow.

```
@MainActor final func makeFileCoordinator() -> sending NSFileCoordinator
```

## Discussion

Call this every time to get a new coordinator for each separate
read or write operation.
SwiftUI coordinates file access for
[`read(from:progress:)`](/documentation/SwiftUI/DocumentReader/read(from:progress:)) and
[`write(snapshot:to:previous:progress:)`](/documentation/SwiftUI/DocumentWriter/write(snapshot:to:previous:progress:))
automatically. Use this method when you need to access the
document’s file at other times — for example, to read a
single sub-file of a package on demand.

Do not reuse coordinators across operations since
`NSFileCoordinator` does not conform to `Sendable`.

---

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)