apple_kit

Apple-native services for Radroots iOS and macOS apps
git clone https://radroots.dev/git/apple_kit.git
Log | Files | Refs | README | LICENSE

RadrootsFilePersistence.swift (544B)


      1 import Foundation
      2 
      3 /// Immutable per-owner mechanics. Internal injection exercises real callers
      4 /// without process-global faults or a public persistence bypass.
      5 struct RadrootsFilePersistence: Sendable {
      6     let install: @Sendable (Data, URL, RadrootsAtomicFile.Mode, Bool) throws -> Void
      7     let synchronize: @Sendable (URL) throws -> Void
      8 
      9     static let live = Self(
     10         install: { try RadrootsAtomicFile.install($0, at: $1, mode: $2, readOnly: $3) },
     11         synchronize: { try RadrootsAtomicFile.synchronizeExisting(at: $0) }
     12     )
     13 }