[enh] more conservative file opens

mike rutenberg mdr at scn.org
Mon Sep 11 10:20:10 UTC 2000


Files are usually opened using oldFileNamed: (which allows writing) when
in fact they will only be read.  This causes two problems: (1) file
opening primitve will fail (to open the file for writing!) if the file
is marked by the OS as readonly (including all files on readonly CDROMs)
and (2) the underlying OS will believe the file needs to be locked to
facilitate the writing until it is explicitly closed (rarely done!) or
garbage collected.

This is a conservative conversion of many uses of oldFileNamed: to
readOnlyFileNamed: where it is clear the file is not written.  No other
modifications of the methods were done.

Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReadOnlyFile.3.cs.gz
Type: application/octet-stream
Size: 9000 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000911/2fcb1047/ReadOnlyFile.3.cs.obj
-------------- next part --------------




More information about the Squeak-dev mailing list