GrafoscopioUtils/repository/Grafoscopio-Utils/MarkupFile.class.st

19 lines
466 B
Smalltalk
Raw Normal View History

2020-05-02 13:28:13 +00:00
Class {
#name : #MarkupFile,
#superclass : #Object,
#instVars : [
'file'
],
#category : #'Grafoscopio-Utils'
}
{ #category : #persistence }
MarkupFile class >> exportAsFileOn: aFileReferenceOrFileName containing: contents [
| file |
file := aFileReferenceOrFileName asFileReference.
file exists ifFalse: [ file ensureCreateFile ].
file writeStreamDo: [ :stream |
2020-05-02 13:28:13 +00:00
stream nextPutAll: contents ].
self inform: 'Exported as: ', String cr, file fullName
2020-05-02 13:28:13 +00:00
]