Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Files.UbiquitousItemStatus

Queres status of a ubiquitous item.

Component Version macOS Windows Linux Server iOS SDK
Files 13.4 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes
MBS( "Files.UbiquitousItemStatus"; Path )   More

Parameters

Parameter Description Example
Path The native path to the file or folder to be checked. "/Users/John/Desktop/test.txt"

Result

Returns JSON or error.

Description

Queres status of a ubiquitous item.
This allows you to check if a file in iCloud, Dropbox or similar provider is downloaded or not.

You can use Files.StartDownloadingUbiquitousItem function to start download or Files.EvictUbiquitousItem to delete local copy of the file.

Returns a JSON with the following keys:

IsUbiquitousItemTrue if this item is synced to the cloud, false if it is only a local file.
IsExcludedFromSyncTrue if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous.
IsDownloadingTrue if data is being downloaded for this item.
IsUploadingTrue if data is being uploaded for this item.
IsUploadedTrue if there is data present in the cloud for this item.
IsDownloadedTrue if file is downloaded.
DownloadingErrorThe error when downloading the item from iCloud failed.
DownloadingStatusThe download status of this item. Can be NotDownloaded, Downloaded, Current or undefined.
DownloadRequestedWhether a download of this item has already been requested.
UploadingErrorThe error when uploading the item to iCloud failed.
HasUnresolvedConflictsTrue if this item has conflicts outstanding.

Examples

Queries status for a file in DropBox:

Set Variable [ $r; Value: MBS("Files.UbiquitousItemStatus"; "/Users/cs/Library/CloudStorage/Dropbox/Test/test.zip") ]

Example result:
{ "DownloadingError" : null, "DownloadingStatus" : "Current", "UploadingError" : null, "IsExcludedFromSync" : false, "IsDownloading" : false, "IsUploading" : false, "IsUploaded" : true, "IsDownloaded" : 1, "DownloadRequested" : false, "IsUbiquitousItem" : true, "HasUnresolvedConflicts" : false }

Query status of a not downloaded file:

Set Variable [ $r; Value: MBS("Files.UbiquitousItemStatus"; "/Users/cs/Library/CloudStorage/Dropbox/Test/test.zip") ]

Example result:
{ "DownloadingError" : null, "DownloadingStatus" : "NotDownloaded", "UploadingError" : null, "IsExcludedFromSync" : false, "IsDownloading" : false, "IsUploading" : false, "IsUploaded" : true, "IsDownloaded" : 0, "DownloadRequested" : false, "IsUbiquitousItem" : true, "HasUnresolvedConflicts" : false }

See also

Release notes

Blog Entries

This function checks for a license.

Created 16th August 2023, last changed 16th August 2023


Files.StartDownloadingUbiquitousItem - Files.Unmount

💬 Ask a question or report a problem