[ENH] Proposal to drop contentsOfEntireFile

Andres Valloud avalloud at exobox.com
Fri Jun 2 19:17:36 UTC 2000


Hi Dan.

> >Proposed solution: rename the method contentsOfEntireFile in FileStream
> >to contents, and fix its 48 senders.
> >I can do this in a while. But... do you think it's ok?
> I think I agree with your desire for uniformity.  I'm not sure this is the best time to change 48 methods to bring this about.  How about when we are into 2.9alpha?

Well... I didn't cause much of a change I think. Senders of
contentsOfEntireFile were changed to send contents. The implementations
of contentsOfEntireFile under FileStream were renamed into contents, and
the contentsOfEntireFile implementations that returned ^self contents or
something like that were removed. So, contents now works, and the
senders still point at the proper implementations. I tried to leave
existing code functional with the things I did in the changeset I
posted. That's why I renamed the methods under FileStream or dropped the
"for compatibility" methods in regular streams.

What is true is that now there are senders of contentsOfEntireFile which
are not in the image, and so were not changed [Bert]. It shouldn't be
too hard to go and change those senders too. Or we could leave a version
of contentsOfEntireFile like:

contentsOfEntireFile
	"Use contents instead"

	^self contents

Andres.





More information about the Squeak-dev mailing list