Factoring serialization to external files.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2019-04-22 20:15:48 +00:00
parent 85a4cbec24
commit 169fd2246e

View File

@ -60,7 +60,15 @@ GrafoscopioUtils class >> ensureCreateDirectory: fileNameWithRelativePath into:
{ #category : #persistence } { #category : #persistence }
GrafoscopioUtils class >> exportAsSton: anObject on: aFileReference [ GrafoscopioUtils class >> exportAsSton: anObject on: aFileReference [
"comment stating purpose of message" aFileReference exists ifTrue: [ aFileReference ensureDelete ].
aFileReference ensureCreateFile.
aFileReference writeStreamDo: [ :stream |
(STON writer on: stream)
newLine: String crlf;
prettyPrint: true;
keepNewLines: true;
nextPut: anObject ].
] ]