--- a/PCFilename.st Tue Sep 22 13:11:18 1998 +0200
+++ b/PCFilename.st Tue Sep 22 13:12:19 1998 +0200
@@ -290,6 +290,37 @@
^ false
!
+isRootDirectory
+ "return true, if I represent a root directory
+ (i.e. I have no parentDir)"
+
+ |nm i|
+
+ nm := self pathName.
+
+ "/ <DRIVE-CHAR>:
+ (((nm size == 3)
+ and:[(nm at:2) == $:])
+ and:[(nm at:3) == $\]) ifTrue:[
+ "/ something like x:\
+ ^ true
+ ].
+ "/ \\REMOTE-HOST:
+ (((nm size > 3)
+ and:[(nm at:1) == $\])
+ and:[(nm at:2) == $\]) ifTrue:[
+ "/ something like \\hostname\
+ i := nm indexOf:$\ startingAt:4.
+ i == nameString size ifTrue:[
+ ^ true
+ ].
+ ].
+ ^ super isRootDirectory
+
+ "Created: / 21.9.1998 / 15:37:41 / cg"
+ "Modified: / 21.9.1998 / 15:45:59 / cg"
+!
+
isVolumeAbsolute
"return true, if the receiver represents an absolute pathname
on some disk volume."
@@ -401,5 +432,5 @@
!PCFilename class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.15 1998-09-09 19:54:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PCFilename.st,v 1.16 1998-09-22 11:12:19 cg Exp $'
! !