Hi Stef,

On Sun, 11 Nov 2018 at 10:04, Stephane Ducasse <[email protected]> wrote:
>
> Hi
>
> I'm checking some of the mooc code in Pharo 70.
>
> The Pharo 50/60 version is
>
> PNGReadWriter createAFormFrom: 'Sprites.png' asFileReference
> binaryReadStream upToEnd
>
> I came up with
>
> PNGReadWriter formFromStream: (File named: 'Sprites.png') readStream
>
> And we can also have
>
> PNGReadWriter formFromStream: 'Sprites.png' asFileReference binaryReadStream
>
> I will add this in the comment of the formFromStream: method.

FileReference is the normal public interface to the file system, while
File is a low level API that is only used in limited circumstances,
e.g. bootstrapping when FileSystem isn't yet available.

Most users shouldn't have to worry about File, so I'd leave it out as
an example.

Cheers,
Alistair

Reply via email to