--- a/Class.st Tue Dec 29 18:03:43 1998 +0100
+++ b/Class.st Thu Jan 07 15:44:49 1999 +0100
@@ -1963,6 +1963,37 @@
"Modified: / 27.8.1998 / 02:07:59 / cg"
!
+binaryFileOutWithSourceMode:sourceMode as:fileNameString
+ "create a file fileNameString,
+ consisting of all methods in myself in a portable binary format.
+ The argument controls how sources are to be saved:
+ #keep - include the source
+ #reference - include a reference to the sourceFile
+ #discard - dont save sources.
+
+ With #reference, the sourceFile needs to be present after reload
+ in order to be browsable."
+
+ |fileName aStream|
+
+ fileName := fileNameString asFilename.
+ fileName makeLegalFilename.
+ fileName := fileName name.
+
+ aStream := FileStream newFileNamed:fileName.
+ aStream isNil ifTrue:[
+ ^ FileOutErrorSignal
+ raiseRequestWith:fileName
+ errorString:('cannot create file:', fileName)
+ ].
+
+ aStream binary.
+ self binaryFileOutOn:aStream sourceMode:sourceMode.
+ aStream close.
+
+ "Created: / 29.12.1998 / 21:38:38 / cg"
+!
+
fileOut
"create a file 'class.st' consisting of all methods in myself in
sourceForm, from which the class can be reconstructed (by filing in).
@@ -3855,5 +3886,5 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.326 1998-12-29 16:58:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.327 1999-01-07 14:44:49 cg Exp $'
! !