From f7d355f105cb958e9433b0bfbc59dbf33edbe898 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 4 Feb 2024 10:33:20 +0100 Subject: [PATCH] fix missing method in Squeak 6 --- .../instance/writeFileStreamOn.do.binary..st | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st diff --git a/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st new file mode 100644 index 00000000..1207150a --- /dev/null +++ b/repository/Grease-Squeak6-Core.package/GRSqueakPlatform.class/instance/writeFileStreamOn.do.binary..st @@ -0,0 +1,8 @@ +as yet unclassified +writeFileStreamOn: aString do: aBlock binary: aBoolean + | stream | + stream := aBoolean + ifTrue: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ] + ifFalse: [ (FileStream fileNamed: aString) binary ]. + [ aBlock value: stream ] + ensure: [ stream close ] \ No newline at end of file