waitForStabilization(completionHandler:)
Requests a notification after the domain stabilizes.
Declaration
func waitForStabilization(completionHandler: @escaping @Sendable ((any Error)?) -> Void)func waitForStabilization() async throwsParameters
- completionHandler:
A block that the system calls after pending changes to both the file system and the provider have completed. The system passes the following parameters:
errorIf an error occurs, this object contains information about the error; otherwise, it’s
nil.
Discussion
Use this method to enforce a consistent state for testing. The system calls the completion handler after all the pending changes to the local cache and the remote storage have completed. The system waits on any changes that requested before the call to waitForStabilization(completionHandler:), but which haven’t completed yet.
See Also
Working with domains
init(for:)import(_:fromDirectoryAt:completionHandler:)add(_:completionHandler:)getDomainsWithCompletionHandler(_:)remove(_:completionHandler:)remove(_:mode:completionHandler:)removeAllDomains(completionHandler:)NSFileProviderManager.DomainRemovalModedisconnect(reason:options:completionHandler:)NSFileProviderManager.DisconnectionOptionsreconnect(completionHandler:)temporaryDirectoryURL()