iCloud.docEvict()

Type Function
Return value none
Revision Release 2024.3703
Keywords iCloud, sync, storage, document, docEvict
See also iCloud.docDownload()
iCloudDocEvent
iCloud.*

Overview

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.

Syntax

iCloud.docEvict( params )
params (required)

Table. Table containing method-specific parameters — see the next section for details.

Parameter Reference

Valid keys for the params table include:

Example

local function docListener( event )

    if event.isError then
        print( event.error )
        print( event.errorCode )
    end
end

iCloud.docEvict(
    {
        filename = "test.txt",
        onComplete = docListener
    }
)