removed via FileBrowser
authorpenk
Wed, 04 Sep 2002 17:35:44 +0200
changeset 1591 d5692dd57326
parent 1590 89e229528104
child 1592 1d268a16d1c4
removed via FileBrowser
Create.st
--- a/Create.st	Wed Sep 04 17:26:34 2002 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-"{ Package: 'stx:libtool2' }"
-
-FileOperations subclass:#Create
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Interface-Support'
-!
-
-
-!Create class methodsFor:'actions'!
-
-createDirectory:newName
-
-    |instance|
-
-    instance := self new.
-    instance createDirectory:newName.
-    ^ instance
-!
-
-createFile:newName
-
-    |instance|
-
-    instance := self new.
-    instance createFile:newName.
-    ^ instance
-! !
-
-!Create methodsFor:'actions'!
-
-createDirectory:newName
-    |msg|
-
-    newName exists ifTrue:[
-        DialogBox warn:(newName, ' already exists.').
-        result := false.
-        ^ self
-    ].
-
-    newName makeDirectory ifFalse:[
-        msg := errorString := ('cannot create directory '', newName,'' !!') , '\\(' , (OperatingSystem lastErrorString) , ')'.
-        errorString := msg withCRs.
-        DialogBox warn:errorString.
-        result := false.
-        ^ self
-    ].
-    result := true.
-!
-
-createFile:file
-    "create an empty file"
-
-    |aStream newName msg|
-
-    newName := file baseName.
-    file exists ifTrue:[
-        (Dialog 
-            confirm:(newName, ' already exists\\truncate ?') withCRs
-            yesLabel:('Truncate')
-            noLabel:('Cancel'))
-        ifFalse:[^ self].
-    ].
-
-    FileStream openErrorSignal handle:[:ex|
-        msg := ('Cannot create file '', newName,'' !!') , '\\(' , (FileStream lastErrorString) , ')'.
-        errorString := msg withCRs.
-        ^ DialogBox warn:errorString
-    ] do:[    
-        aStream := file newReadWriteStream.
-    ].
-    aStream notNil ifTrue:[
-        aStream close.
-    ] ifFalse:[
-        msg := ('Cannot create file '', newName, '' !!') , '\\(' , (FileStream lastErrorString) , ')'.
-        errorString := msg withCRs.
-        ^ DialogBox warn:errorString
-    ].
-! !
-
-!Create class methodsFor:'documentation'!
-
-version
-    ^ '$Header$'
-! !