Livecode Wiki
Advertisement

Removes a file that was placed in the local cache by the load command, or cancels a download or upload in progress.

Built-in Message handler[]

Syntax:

unload [URL] <cachedURL>

Examples:

unload URL "http://www.example.com"
unload URL (line 1 of the cachedURLs)
unload URL "ftp://ftp.example.org/newfiles/latest.txt"

Use the unload command to release memory used by a cached URL(keyword) when you no longer need it.

If the cachedURL is still being downloaded with the load command, the unload command cancels the download.

The unload command can be used to cancel any non-blocking FTP or HTTP file transfer in progress, but it does not cancel file transfers that were initiated by using a URL(keyword) container in an expression or by putting something into a URL(keyword).

The unload command removes the cachedURL from the URLStatus function. This includes URLs that have been uploaded with the libURLftpUpload command, as well as those that have been cached with the load command.

You can use a URL(keyword) with the URL(keyword) keyword even after it has been unloaded from the cache, but caching speeds up access to the URL(keyword).

Parameters:

  • cachedURL: Any URL in the cachedURLs or any URL whose transfer was started with thelibURLftpUpload, libURLftpUploadFile, or libURLDownloadToFile command.
  • The result: If the cachedURL is not in the cache and not currently beinguploaded or downloaded, the result function isset to "can't find url".

See also: libURLDownloadToFile (command),get (command),load (command),function (control structure),result (function),cachedURLs (function),URLStatus (function),

Advertisement