Help with loading files and access write

Andreas Raab Andreas.Raab at gmx.de
Sun Sep 8 17:08:15 UTC 2002


> (FileStream oldFileNamed: 'MW-32a-4599.3.cs') fileIntoNewChangeSet.
> I got an error when the file is readonly when the file is read write 
> everything works well.
> 
> Is there a way not to get this problem?

Use FileStream>>readOnlyFileNamed: instead. Using #oldFileNamed: implies
that you wish to be able to read *and* write that file which of course
doesn't work. [Random note: It seems most people never think about this
which is really a problem - I've run into all sorts of problems when
dealing with read-only files from Squeak for absolutely no good reason].

Cheers,
  - Andreas




More information about the Squeak-dev mailing list