getFileMetadata method

  1. @override
Future<CloudFile> getFileMetadata(
  1. String path
)
override

Retrieves metadata for the file or directory at the specified path.

Implementation

@override
Future<CloudFile> getFileMetadata(String path) async {
  final allFiles = await _icloudSync.gather(containerId: _containerId);
  final foundFile = allFiles.firstWhere(
    (f) => f.relativePath == path,
    orElse: () =>
        throw Exception('iCloudProvider: File not found at path: $path'),
  );
  return _mapToCloudFile(foundFile);
}