Type Function Return value none Revision Release 2024.3703 Keywords iCloud, sync, storage, document, docEvict See also iCloud.docDownload() iCloudDocEvent iCloud.*
Signals the system that the file will not be required (for access) immediately. The file will not be deleted from iCloud storage — it will still be available in iCloud through iCloud.docRead(), but access will be much slower.
This method invokes the onComplete
listener function with an iCloudDocEvent when the file is marked for eviction, not when the local file is actually deleted.
iCloud.docEvict( params )
Table. Table containing
Valid keys for the params
table include:
filename
— Required; file to be evicted.
onComplete
— Required listener function to be invoked with an iCloudDocEvent.
containerId
— Optional string value indicating a specific iCloud Container to be used for document storage. Do not pass this parameter if you have only one iCloud Container associated with your app.
local function docListener( event ) if event.isError then print( event.error ) print( event.errorCode ) end end iCloud.docEvict( { filename = "test.txt", onComplete = docListener } )