Factoring serialization to external files.
This commit is contained in:
parent
85a4cbec24
commit
169fd2246e
@ -60,7 +60,15 @@ GrafoscopioUtils class >> ensureCreateDirectory: fileNameWithRelativePath into:
|
||||
|
||||
{ #category : #persistence }
|
||||
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 ].
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user