Saving text file as read-only
Brian Yennie
briany at qldlearning.com
Sun May 16 11:20:00 EDT 2004
Bruce,
A couple of suggestions:
1) Include a checksum in the file of it's contents- if the checksum
doesn't match the file contents then you know that someone modified the
file. See md5() function to generate a unique value based on the
contents of the file. Unless you students know how to update the
checksum, you should be safe.
2) If you are on an operating system with user/group permissions you
can manipulate, grant ownership of the files to a super-user, and
read-only permission to others. On MacOS X, for example, you can do
something like:
sudo chown admin myfile.txt
chmod +r myfile.txt
Using shell().
HTH,
Brian
> I want to save student records from a little grammar program in a text
> file, but I don't want the students to improve their results!!
>
> I can do a simple encryption with
>
> put numToChar(charToNum(char x of cd fld "data")+20) after holdit
>
> but a better way would be to save the text file as read only. I can't
> find any way to do that. Can anyone help?
More information about the use-livecode
mailing list