ContainerItem class

A file or directory entry from the iCloud ubiquity container, enumerated via FileManager.contentsOfDirectory with URL resource values.

Unlike ICloudFile (populated from NSMetadataQuery), this model is immediately consistent after local filesystem mutations (rename, delete, copy). It provides download/upload status via URL resource values rather than the Spotlight metadata index.

Use ICloudStorage.listContents to obtain these items.

When to use this vs ICloudFile

  • After your own mutations (rename, delete, save): use listContents for immediate consistency.
  • For remote sync monitoring (changes from other devices): use gather() which provides real-time notifications and download progress.
  • Initial discovery on a new device: gather() discovers document promises (files not yet placeholder'd locally); listContents only sees files with a local representation.

Constructors

ContainerItem.fromMap(Map map)
Creates a ContainerItem from a platform channel map.

Properties

downloadStatus DownloadStatus?
Download status from URLUbiquitousItemDownloadingStatus.
final
hashCode int
The hash code for this object.
no setterinherited
hasUnresolvedConflicts bool
Whether this item has unresolved version conflicts.
final
isDirectory bool
Whether this entry represents a directory.
final
isDownloaded bool
Whether the item has local content available.
no setter
isDownloading bool
Whether the system is actively downloading this item.
final
isUploaded bool
Whether this item has been uploaded to iCloud.
final
isUploading bool
Whether the system is actively uploading this item.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
relativePath String
File path relative to the iCloud container root, regardless of which subdirectory was passed as relativePath to listContents.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited