I am using PharoCloud to host a Pharo image for me. By default it downloads a ZIP of the image only to my appliance; this ZIP doesn't include the .sources file.
I am trying to manually download the sources file with ZnClient. The directory my image is located in is /mnt/upload/upload.140605183221
.
This is the code I have
| aFileStream |
aFileStream := '/mnt/universe/upload/upload.140605183221/PharoV30.sources' asFileName writeStream.
aFileStream write: (ZnClient new get: 'http://files.pharo.org/sources/PharoV30.sources.zip').
aFileStream close.
I'm brand new to ZnClient; I don't know how to use it. What's wrong with my code?
You can do this:
'./PharoV30.sources' asFileReference
writeStreamDo: [ :stream |
stream write: (ZnClient new get: 'http://files.pharo.org/sources/PharoV30.sources') contents ].