PCFilename.st
changeset 9207 423fa321c344
parent 8956 9a32792d4a92
child 9208 e15f9e251dc1
--- a/PCFilename.st	Fri Mar 03 10:56:38 2006 +0100
+++ b/PCFilename.st	Fri Mar 03 10:56:43 2006 +0100
@@ -409,6 +409,34 @@
     "Modified: 16.10.1997 / 13:10:00 / cg"
 !
 
+fullAlternativePathName
+    "return my complete MSDOS-path"
+    
+    |altNameComponent fullAlternativePath fullAlternativeDirectoryName|
+
+    self isRootDirectory ifTrue:[
+        ^ nameString
+    ].
+    (self name endsWith:$\) ifTrue:[
+        ^ (self class named:self pathName) fullAlternativePathName
+    ].
+    altNameComponent := self info alternativeName.
+    fullAlternativeDirectoryName := self directory fullAlternativePathName.
+    (fullAlternativeDirectoryName endsWith:$\) ifTrue:[
+        fullAlternativePath := fullAlternativeDirectoryName 
+                    , (altNameComponent ? self baseName).
+    ] ifFalse:[
+        fullAlternativePath := fullAlternativeDirectoryName , '\' , (altNameComponent ? self baseName).
+    ].
+    ^ fullAlternativePath
+
+    "
+     'C:\Dokumente und Einstellungen\str\Desktop\output folder' asFilename fullAlternativeName 
+     'C:\Dokumente und Einstellungen\str\Desktop\output folder' asFilename fullAlternativeName asFilename exists
+     'C:\' asFilename fullAlternativeName  
+    "
+!
+
 isDirectory
     "return true, if I represent a directory 
      Redefined to care for volumeRoots."
@@ -762,5 +790,5 @@
 !PCFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.33 2005-10-12 07:52:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.34 2006-03-03 09:56:43 sr Exp $'
 ! !