Remote sync of webdav

This commit is contained in:
Courtney Arnold 2026-08-13 17:05:10 -05:00
parent f01186df79
commit 483fbeafb6
44 changed files with 4842 additions and 975 deletions

View file

@ -1,4 +1,4 @@
import 'drive_service.dart' show DriveLockFile;
import 'cloud/cloud_storage_provider.dart' show CloudLockFile;
/// Ticket-based mutex using timestamped lock files as the coordination
/// point: create a lock named after our own timestamp, then wait until no
@ -7,12 +7,13 @@ import 'drive_service.dart' show DriveLockFile;
/// device that crashed/went offline before releasing its own lock.
///
/// Pure orchestration over injected operations (rather than a concrete
/// Drive dependency) so the state machine is unit-testable without a real
/// network connection.
/// cloud storage dependency) so the state machine is unit-testable without
/// a real network connection, and works identically no matter which
/// [CloudStorageProvider] it's wired to.
Future<String> acquireLock({
required String username,
required Future<String> Function(String lockName) createLock,
required Future<List<DriveLockFile>> Function() listLocks,
required Future<List<CloudLockFile>> Function() listLocks,
required Future<void> Function(String lockId) deleteLock,
DateTime Function()? nowUtc,
Future<void> Function(Duration)? delay,