Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.154.mcz==================== Summary ====================
Name: Files-ul.154
Author: ul
Time: 15 May 2016, 11:17:08.015805 pm
UUID: 7a4281ea-9f72-4784-ac30-b324ca3b456e
Ancestors: Files-nice.153
- use #adoptInstance: to convert between binary and ascii mode instead of creating new collections
=============== Diff against Files-nice.153 ===============
Item was changed:
----- Method: StandardFileStream>>ascii (in category 'properties-setting') -----
ascii
"opposite of binary"
+
+ ByteString adoptInstance: buffer1.
+ collection ifNotNil: [ ByteString adoptInstance: collection ].
- buffer1 := ByteString new: 1.
- collection ifNotNil: [collection := collection asString].
lastWritten ifNotNil: [lastWritten isInteger ifTrue: [lastWritten := lastWritten asCharacter]]!
Item was changed:
----- Method: StandardFileStream>>binary (in category 'properties-setting') -----
binary
+
+ ByteArray adoptInstance: buffer1.
+ collection ifNotNil: [ ByteArray adoptInstance: collection ].
- buffer1 := ByteArray new: 1.
- collection ifNotNil: [collection := collection asByteArray].
lastWritten ifNotNil: [lastWritten isCharacter ifTrue: [lastWritten := lastWritten asInteger]]!