I just want to ask whether it is possible to make a file unwritable after the file has been written into. For example, i write some text into a txt file then i make the file lock being it can be read only and cannot be written into.
Thanks a lot
posted 11 years ago
after the file has been written into, use the File class tomake it 'unwritable' or in other words, 'read only'.
that sets the read only attribute of the file to true, hence making the file read-only.