I'd like one of the two possibilities:
1) "as file" could be the general case, and we could also gain access to "as filesave", "as filetext", "as filedata", etc. for more specific cases. This is the client-side version.
mob/verb/load_file(datafile as filesave)
//Only accepts a savefile, otherwise the client
// will report an error on loading and no data will be
// transmitted to the server.
var/savefile/F = datafile
F[""] >> src
2) A new filetype() procedure which would return constant values in a similar fashion, which we could use to confirm the file type of any provided "as file" input. This is the server-side version.
mob/verb/load_file(datafile as file)
if(filetype(datafile) != FILE_SAVEFILE) return
var/savefile/F = datafile
F[""] >> src
An optional bonus feature: as ext("sav","txt") which would allow you to control the extensions of files shown using the standard Win32 file dialog. Intended to be used in conjunction with the as file flag.
-- Data