Receive iCloud drive file upload notification

I have the need to evict local copies of files in swift, currently I'm doing it the naive way:

while !evict_ok {
    do {
        try FileManager.default.evictUbiquitousItem(at: url)
        evict_ok = true
    } catch {
        sleep(evict_retry_interval)
    }
}

this is needed because we might try to evict the item that has not yet finished being uploaded to the drive.

?> Is there a way to register for a notification / get file state which signifies it's being uploaded, when the upload has not been initiated by us (some other filesystem activity)

Receive iCloud drive file upload notification
 
 
Q