#nullFilename
authorStefan Vogel <sv@exept.de>
Wed, 23 Feb 2005 12:51:54 +0100
changeset 8753 a134e378d5f5
parent 8752 3e7429854c55
child 8754 1efa34b61e9b
#nullFilename
PCFilename.st
--- a/PCFilename.st	Wed Feb 23 12:49:35 2005 +0100
+++ b/PCFilename.st	Wed Feb 23 12:51:54 2005 +0100
@@ -97,15 +97,8 @@
 
     |pid nr nameString|
 
-    (self ~~ ConcreteClass) ifTrue:[
-	^ ConcreteClass newTemporaryIn:aDirectoryPrefix
-    ].
-
-    "/ although the above allows things to be redefined in concrete classes,
-    "/ the following should work on all systems ...
-
     NextTempFilenameIndex isNil ifTrue:[
-	NextTempFilenameIndex := 1.
+        NextTempFilenameIndex := 1.
     ].
 
     pid := OperatingSystem getProcessId printString.
@@ -113,12 +106,12 @@
     nr := NextTempFilenameIndex printString.
     nr := nr copyLast:(3 min:nr size).
     nameString := (self tempFileNameTemplate)
-		  bindWith:pid 
-		  with:nr.
+                  bindWith:pid 
+                  with:nr.
     NextTempFilenameIndex := NextTempFilenameIndex + 1.
 
     (aDirectoryPrefix isNil or:[aDirectoryPrefix asString isEmpty]) ifFalse:[
-	^ aDirectoryPrefix asFilename construct:nameString
+        ^ aDirectoryPrefix asFilename construct:nameString
     ].
     ^ self named:nameString
 
@@ -231,6 +224,20 @@
     ^ false
 !
 
+nullFilename
+    "Return the OS dependent filename for the data sink, or nil if there is none"
+
+    ^ 'nul:'
+!
+
+parentDirectoryName
+    "return the name used for the parent directory.
+     This is '..' for unix and dos-like systems.
+     (there may be more in the future."
+
+    ^ '..'
+!
+
 separator
     "return the file/directory separator."
 
@@ -724,5 +731,5 @@
 !PCFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.27 2004-12-15 10:31:29 penk Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.28 2005-02-23 11:51:54 stefan Exp $'
 ! !