--- a/HierarchicalURI.st Wed Jul 09 14:40:33 2003 +0200
+++ b/HierarchicalURI.st Wed Jul 09 14:51:46 2003 +0200
@@ -1,7 +1,7 @@
"{ Package: 'stx:libbasic2' }"
URI subclass:#HierarchicalURI
- instanceVariableNames:'authority isAbsolute pathSegments query fragment'
+ instanceVariableNames:'authority isAbsolute isDirectory pathSegments query fragment'
classVariableNames:''
poolDictionaries:''
category:'Resources'
@@ -107,6 +107,12 @@
^ isAbsolute
!
+isDirectory
+ "return the value of the instance variable 'isDirectory' (automatically generated)"
+
+ ^ isDirectory ? false
+!
+
pathSegements
"return the value of the instance variable 'pathSegements' (automatically generated)"
@@ -288,6 +294,10 @@
path := aString copyFrom:i+1.
path size ~~ 0 ifTrue:[
pathSegments add:path.
+ ] ifFalse:[
+ (aString at:i) == $/ ifTrue:[
+ isDirectory := true
+ ].
].
^ self.
] ifFalse:[
@@ -313,7 +323,7 @@
].
"
- self new fromString:'//authority/path1/path2'
+ self new fromString:'//authority/path1/path2/'
self new fromString:'//authority/path1/path2?query'
self new fromString:'//authority/path1/path2?query#fragment'
self new fromString:'/path1/path2?query#fragment'
@@ -434,5 +444,5 @@
!HierarchicalURI class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/HierarchicalURI.st,v 1.2 2003-06-24 14:10:39 tm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/HierarchicalURI.st,v 1.3 2003-07-09 12:51:46 tm Exp $'
! !