File Object

Purpose:

Perform multi-threaded file operations.

Syntax:

file.method

where method is one of the following

open

openSAF

getSAF

saveSAF

deleteSAF

getfilenopath

getfilenoext

getfilecount

getfileindex

getfileeerror

getfilesize

getfileprogress

getmimetype

getstatus

filename

 

Comments:

The file object is used when the file operation is lengthy and should be on a separate thread.

Sometimes we need to access a file on another system where it may take a while to receive it.  By using a secondary thread we do not lock up the user interface which proves a poor user experience.

Example:

file.actioncomplete = "gotsaf"
file.getsaf // go get a file using SAF
dowhile (1)
// do other stuff
endwhile
gotsaf: // we now have the file
titlebar.text = file.getfilenopath + " Complete"

return