---
title: "currentSyncAnchor(completionHandler:)"
framework: fileprovider
role: symbol
role_heading: Instance Method
path: "fileprovider/nsfileproviderenumerator/currentsyncanchor(completionhandler:)"
---

# currentSyncAnchor(completionHandler:)

Returns the current sync anchor.

## Declaration

```swift
optional func currentSyncAnchor(completionHandler: @escaping @Sendable (NSFileProviderSyncAnchor?) -> Void)
```

```swift
optional func currentSyncAnchor() async -> NSFileProviderSyncAnchor?
```

## Discussion

Discussion important: You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration: optional func currentSyncAnchor() async -> NSFileProviderSyncAnchor? For information about concurrency and asynchronous code in Swift, see Calling Objective-C APIs Asynchronously.

## See Also

### Enumerating Items and Changes

- [enumerateItems(for:startingAt:)](fileprovider/nsfileproviderenumerator/enumerateitems(for:startingat:).md)
- [enumerateChanges(for:from:)](fileprovider/nsfileproviderenumerator/enumeratechanges(for:from:).md)
- [invalidate()](fileprovider/nsfileproviderenumerator/invalidate().md)
