Files
nextcloud-desktop/shell_integration/MacOSX/NextcloudFileProviderKit/Tests/Interface/MockChangeNotificationInterface.swift
2025-12-03 16:48:23 +01:00

20 lines
525 B
Swift

// SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
// SPDX-License-Identifier: LGPL-3.0-or-later
import Foundation
import NextcloudFileProviderKit
public final class MockChangeNotificationInterface: ChangeNotificationInterface {
public typealias ChangeHandler = @Sendable () -> Void
let changeHandler: ChangeHandler?
public init(changeHandler: ChangeHandler? = nil) {
self.changeHandler = changeHandler
}
public func notifyChange() {
changeHandler?()
}
}