[Pharo-project] Now you can use Fuel with FileSystem

Guido Stepken gstepken at googlemail.com
Sun Jan 8 05:15:02 EST 2012


Hi Mariano!

Love it, great work!

Love objects StOMPing, rSTing, Fueling around between images at runtime.

Do you have examples how to realize realtime mirroring (HA) with it?

tnx in advance, Guido Stepken
 Am 07.01.2012 23:25 schrieb "Mariano Martinez Peck" <marianopeck at gmail.com
>:

> Hi guys. Now you can use FileSystem streams for Fuel. Fuel only needs one
> small package 'FuelFileSystem' which has just 3 extension methods, and
> that's all ;)
> There is also 'FuelFileSystemTests' which let's you run all fuel tests
> using FS. If you want to do that, change FLSerializationTest >> setUp to
> send #useFileSystemFileStream  rather than #useStandardFileStream and
> that's all.
> To install:
>
> Gofer new
>     squeaksource: 'MetacelloRepository';
>     package: 'ConfigurationOfFuel';
> load.
>
> (ConfigurationOfFuel project version: #bleedingEdge) load: 'withFS'.
>
> An example:
>
>     | sourceArray loadedArray serializer stream materializer |
>     sourceArray :=
>         Array
>             with: 'a string'
>             with: Transcript
>             with: [ Transcript show: 'a string' ].
>     "Create a file and serialize on it"
>     stream := (FSLocator imageDirectory / 'example.fuel') writeStream.
>     serializer := FLSerializer newDefault.
>     serializer serialize: sourceArray on: stream.
>     stream close.
>     "Load from the file"
>     stream := (FSLocator imageDirectory / 'example.fuel') readStream.
>     materializer := FLMaterializer newDefault.
>     loadedArray := (materializer materializeFrom: stream) root.
>
> Cheers
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120108/19684a8d/attachment-0001.html>


More information about the Pharo-dev mailing list