Repackaging general utilities for working with Markup files.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-28 11:54:00 -05:00
parent 4487348041
commit 217ab5dad7
1 changed files with 0 additions and 23 deletions

View File

@ -1,23 +0,0 @@
"
I model common operations made with several markup files.
"
Class {
#name : #MarkupFile,
#superclass : #Object,
#instVars : [
'file'
],
#category : #'Grafoscopio-Utils-Core'
}
{ #category : #persistence }
MarkupFile class >> exportAsFileOn: aFileReferenceOrFileName containing: text [
| file |
file := aFileReferenceOrFileName asFileReference.
file ensureDelete.
file exists ifFalse: [ file ensureCreateFile ].
file writeStreamDo: [ :stream |
stream nextPutAll: text withUnixLineEndings].
self inform: 'Exported as: ', String cr, file fullName.
^ file
]