request: EraseFile()
Posted: Sun Jan 15, 2012 1:28 pm
We have writefile() and readfile(), but is missing something to erase those files.
A "EraseFile(file_string)" does delete requested file and his backup (.bak file created on writefile overwrite).
My goal with this request is create dynamic gump caches where instead process a entire gump (e.g. a craft skill) again and again and again, we can just store the full gump on a file with something like this:
A "EraseFile(file_string)" does delete requested file and his backup (.bak file created on writefile overwrite).
My goal with this request is create dynamic gump caches where instead process a entire gump (e.g. a craft skill) again and again and again, we can just store the full gump on a file with something like this:
Code: Select all
if (!readfile ("layout.txt"))
create entire gump layout...
and save_gump_cache (layout, data);
endif
var gump := senddialoggump (who, layout, data);
function save_gump_cache (layout, data)
writefile ("layout.txt", layout);
writefile ("data.txt", data);
endfunction