dolphin compatibility
authorClaus Gittinger <cg@exept.de>
Mon, 25 Mar 2002 18:18:40 +0100
changeset 6474 92a666c5b104
parent 6473 2fa4b6ba2c13
child 6475 64529b4dc41b
dolphin compatibility
ExternalStream.st
FileStream.st
--- a/ExternalStream.st	Mon Mar 25 18:11:37 2002 +0100
+++ b/ExternalStream.st	Mon Mar 25 18:18:40 2002 +0100
@@ -1859,6 +1859,12 @@
     ^ false
 ! !
 
+!ExternalStream methodsFor:'Compatibility - Dolphin'!
+
+beText
+    self text
+! !
+
 !ExternalStream methodsFor:'Compatibility - Squeak'!
 
 nextInto:aByteArrayOrString
@@ -5715,6 +5721,6 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.234 2002-03-11 10:49:22 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.235 2002-03-25 17:18:40 cg Exp $'
 ! !
 ExternalStream initialize!
--- a/FileStream.st	Mon Mar 25 18:11:37 2002 +0100
+++ b/FileStream.st	Mon Mar 25 18:18:40 2002 +0100
@@ -478,6 +478,37 @@
 	s binary
     ].
     ^ s
+!
+
+write:filename mode:modeSymbol
+    "return a writable FileStream for the file named filename, aString.
+     The modeSymbol controls how the file is opened; currently supported are:
+        #append
+    "
+
+    modeSymbol == #append ifTrue:[
+        ^ self appendingOldFileNamed:filename
+    ].
+    self halt:'unsupported mode'.
+    ^ nil
+!
+
+write:filename text:textModeBoolean
+    "return a writable FileStream for the file named filename, aString.
+     If the argument, text is false, the stream is setup to write binary bytes,
+     if false, it writes characters."
+
+    |s|
+
+    s := self fileNamed:filename.
+    s notNil ifTrue:[
+        textModeBoolean ifTrue:[
+            s text
+        ] ifFalse:[
+            s binary
+        ]
+    ].
+    ^ s
 ! !
 
 !FileStream class methodsFor:'Compatibility - Squeak'!
@@ -1319,6 +1350,6 @@
 !FileStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.83 2002-03-14 23:03:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.84 2002-03-25 17:18:18 cg Exp $'
 ! !
 FileStream initialize!