author | Stefan Vogel <sv@exept.de> |
Sun, 27 Jul 2003 19:44:44 +0200 | |
changeset 1289 | a4744b1283d5 |
parent 1277 | 1a3385f21b76 |
child 1309 | c752d54f4e09 |
permissions | -rw-r--r-- |
1005 | 1 |
"{ Package: 'stx:libbasic2' }" |
2 |
||
3 |
URI subclass:#HierarchicalURI |
|
1257 | 4 |
instanceVariableNames:'authority isAbsolute isDirectory pathSegments query fragment' |
1005 | 5 |
classVariableNames:'' |
6 |
poolDictionaries:'' |
|
7 |
category:'Resources' |
|
8 |
! |
|
9 |
||
10 |
!HierarchicalURI class methodsFor:'documentation'! |
|
11 |
||
12 |
documentation |
|
13 |
" |
|
14 |
Hierarchical URI as defined in RFC2396: |
|
15 |
||
16 |
<scheme:[//authority][/absolute_path][?query][#fragment]> |
|
17 |
||
18 |
[author:] |
|
19 |
Stefan Vogel (stefan@zwerg) |
|
20 |
||
21 |
[see also:] |
|
22 |
||
23 |
[instance variables:] |
|
24 |
||
25 |
[class variables:] |
|
26 |
" |
|
27 |
! |
|
28 |
||
29 |
examples |
|
30 |
" |
|
31 |
||
32 |
more examples to be added: |
|
33 |
[exBegin] |
|
1254 | 34 |
|u1 u2| |
35 |
||
36 |
u1 := URI fromString:'file:/phys/exept/tmp/'. |
|
37 |
u2 := u1 construct:'test.txt'. |
|
38 |
Transcript showCR:u1. |
|
39 |
Transcript showCR:u2. |
|
40 |
[exEnd] |
|
41 |
||
42 |
[exBegin] |
|
43 |
|u1 u2| |
|
44 |
||
45 |
u1 := URI fromString:'file:/phys/exept/tmp'. |
|
46 |
u2 := u1 construct:'test.txt'. |
|
47 |
Transcript showCR:u1. |
|
48 |
Transcript showCR:u2. |
|
1005 | 49 |
[exEnd] |
50 |
" |
|
51 |
! ! |
|
52 |
||
53 |
!HierarchicalURI class methodsFor:'instance creation'! |
|
54 |
||
55 |
new |
|
56 |
||
57 |
^ self basicNew initialize |
|
58 |
! |
|
59 |
||
60 |
scheme:aSchemeString fromString:aString |
|
61 |
"parse the hierarchical information. |
|
62 |
schemeString is ignored here" |
|
63 |
||
64 |
^ self new scheme:aSchemeString; |
|
65 |
fromString:aString |
|
66 |
! ! |
|
67 |
||
68 |
!HierarchicalURI methodsFor:'accessing'! |
|
69 |
||
70 |
authority |
|
71 |
"return the value of the instance variable 'authority' (automatically generated)" |
|
72 |
||
73 |
^ authority |
|
74 |
! |
|
75 |
||
76 |
authority:something |
|
77 |
"set the value of the instance variable 'authority' (automatically generated)" |
|
78 |
||
79 |
authority := something. |
|
80 |
! |
|
81 |
||
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
82 |
baseName |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
83 |
^ pathSegments last |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
84 |
! |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
85 |
|
1254 | 86 |
examples |
87 |
" |
|
88 |
||
89 |
more examples to be added: |
|
90 |
[exBegin] |
|
91 |
URI fromString:'file:/phys/exept/home/tm/tmp' |
|
92 |
[exEnd] |
|
93 |
" |
|
94 |
! |
|
95 |
||
1005 | 96 |
fragment |
97 |
"return the value of the instance variable 'fragment' (automatically generated)" |
|
98 |
||
99 |
^ fragment |
|
100 |
! |
|
101 |
||
102 |
fragment:something |
|
103 |
"set the value of the instance variable 'fragment' (automatically generated)" |
|
104 |
||
105 |
fragment := something. |
|
106 |
! |
|
107 |
||
108 |
isAbsolute |
|
109 |
"return the value of the instance variable 'isAbsolute' (automatically generated)" |
|
110 |
||
111 |
^ isAbsolute |
|
112 |
! |
|
113 |
||
1257 | 114 |
isDirectory |
115 |
"return the value of the instance variable 'isDirectory' (automatically generated)" |
|
116 |
||
117 |
^ isDirectory ? false |
|
118 |
! |
|
119 |
||
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
120 |
pathSegments |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
121 |
"return the value of the instance variable 'pathSegments' (automatically generated)" |
1005 | 122 |
|
123 |
^ pathSegments |
|
124 |
! |
|
125 |
||
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
126 |
pathSegments:something |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
127 |
"set the value of the instance variable 'pathSegments' (automatically generated)" |
1005 | 128 |
|
129 |
pathSegments := something. |
|
130 |
! |
|
131 |
||
132 |
query |
|
133 |
"return the value of the instance variable 'query' (automatically generated)" |
|
134 |
||
135 |
^ query |
|
136 |
! |
|
137 |
||
138 |
query:something |
|
139 |
"set the value of the instance variable 'query' (automatically generated)" |
|
140 |
||
141 |
query := something. |
|
142 |
! ! |
|
143 |
||
144 |
!HierarchicalURI methodsFor:'accessing-details'! |
|
145 |
||
146 |
host |
|
147 |
"answer the host part of authority" |
|
148 |
||
149 |
|start end| |
|
150 |
||
151 |
authority isNil ifTrue:[ |
|
152 |
^ nil |
|
153 |
]. |
|
154 |
start := (authority indexOf:$@) + 1. |
|
155 |
end := (authority indexOf:$: startingAt:start) - 1. |
|
156 |
end == -1 ifTrue:[ |
|
157 |
end := authority size |
|
158 |
]. |
|
159 |
^ authority copyFrom:start to:end |
|
160 |
||
161 |
" |
|
162 |
(self fromString:'ftp://stefan@www.exept.de:80/test') host |
|
163 |
(self fromString:'ftp://www.exept.de:80/test') host |
|
164 |
(self fromString:'ftp://www.exept.de/test') host |
|
165 |
" |
|
166 |
! |
|
167 |
||
168 |
password |
|
169 |
"answer the user part of authority" |
|
170 |
||
171 |
|end start| |
|
172 |
||
173 |
authority isNil ifTrue:[ |
|
174 |
^ nil |
|
175 |
]. |
|
176 |
end := authority indexOf:$@. |
|
177 |
end == 0 ifTrue:[ |
|
178 |
^ nil |
|
179 |
]. |
|
180 |
start := authority indexOf:$:. |
|
181 |
(start == 0 or:[start > end]) ifTrue:[ |
|
182 |
^ nil |
|
183 |
]. |
|
184 |
^ authority copyFrom:start+1 to:end-1 |
|
185 |
||
186 |
" |
|
187 |
(self fromString:'ftp://stefan@www.exept.de:80/test') password |
|
188 |
(self fromString:'ftp://stefan:pass@www.exept.de:80/test') password |
|
189 |
(self fromString:'ftp://www.exept.de:80/test') password |
|
190 |
" |
|
191 |
! |
|
192 |
||
193 |
port |
|
194 |
"answer the port part of authority" |
|
195 |
||
196 |
|start| |
|
197 |
||
198 |
authority isNil ifTrue:[ |
|
199 |
^ self defaultPort |
|
200 |
]. |
|
201 |
start := authority indexOf:$@. |
|
202 |
start := authority indexOf:$: startingAt:start. |
|
203 |
start == 0 ifTrue:[ |
|
204 |
^ self defaultPort |
|
205 |
]. |
|
206 |
||
207 |
^ authority copyFrom:start+1 |
|
208 |
||
209 |
" |
|
210 |
(self fromString:'ftp://stefan@www.exept.de:80/test') port |
|
211 |
(self fromString:'ftp://www.exept.de:80/test') port |
|
212 |
(self fromString:'ftp://www.exept.de/test') port |
|
213 |
" |
|
214 |
! |
|
215 |
||
216 |
user |
|
217 |
"answer the user part of authority" |
|
218 |
||
219 |
|end end1| |
|
220 |
||
221 |
authority isNil ifTrue:[ |
|
222 |
^ nil |
|
223 |
]. |
|
224 |
end := authority indexOf:$@. |
|
225 |
end == 0 ifTrue:[ |
|
226 |
^ nil |
|
227 |
]. |
|
228 |
end1 := authority indexOf:$:. |
|
229 |
end1 ~~ 0 ifTrue:[ |
|
230 |
end := end min:end1. |
|
231 |
]. |
|
232 |
^ authority copyTo:end-1 |
|
233 |
||
234 |
" |
|
235 |
(self fromString:'ftp://stefan@www.exept.de:80/test') user |
|
236 |
(self fromString:'ftp://stefan:pass@www.exept.de:80/test') user |
|
237 |
(self fromString:'ftp://www.exept.de:80/test') user |
|
238 |
" |
|
239 |
! ! |
|
240 |
||
1289 | 241 |
!HierarchicalURI methodsFor:'comparing'! |
242 |
||
243 |
= anHierarchicalUri |
|
244 |
||
245 |
^ self class == anHierarchicalUri class |
|
246 |
and:[self scheme = anHierarchicalUri scheme |
|
247 |
and:[pathSegments = anHierarchicalUri pathSegments |
|
248 |
and:[authority = anHierarchicalUri authority |
|
249 |
and:[self isAbsolute = anHierarchicalUri isAbsolute |
|
250 |
and:[self isDirectory = anHierarchicalUri isDirectory |
|
251 |
and:[query = anHierarchicalUri query |
|
252 |
and:[fragment = anHierarchicalUri fragment]]]]]]] |
|
253 |
! |
|
254 |
||
255 |
hash |
|
256 |
||
257 |
^ pathSegments hash xor:query hash |
|
258 |
! ! |
|
259 |
||
1254 | 260 |
!HierarchicalURI methodsFor:'copying'! |
261 |
||
262 |
postCopy |
|
263 |
||
264 |
pathSegments := pathSegments copy |
|
265 |
! ! |
|
266 |
||
1005 | 267 |
!HierarchicalURI methodsFor:'defaults'! |
268 |
||
269 |
defaultPort |
|
270 |
"answer the default port for the given scheme. |
|
271 |
Concrete subclasses redefine this method" |
|
272 |
||
273 |
^ nil |
|
274 |
! ! |
|
275 |
||
276 |
!HierarchicalURI methodsFor:'escape'! |
|
277 |
||
278 |
unEscape |
|
279 |
"convert escaped characters (such as %20 for ' ') to their native |
|
280 |
representation" |
|
281 |
||
282 |
authority := self class unEscape:authority readStream. |
|
283 |
pathSegments keysAndValuesDo:[:i :v| |
|
284 |
pathSegments at:i put:(self class unEscape:v readStream). |
|
285 |
]. |
|
286 |
query := self class unEscape:query readStream. |
|
287 |
fragment := self class unEscape:fragment readStream. |
|
288 |
! ! |
|
289 |
||
290 |
!HierarchicalURI methodsFor:'initialize'! |
|
291 |
||
292 |
fromString:aString |
|
293 |
||
294 |
|i i1 separator| |
|
295 |
||
296 |
(aString startsWith:'//') ifTrue:[ |
|
1268 | 297 |
i := aString indexOfAny:'/?#' startingAt:3. |
1005 | 298 |
i == 0 ifTrue:[ |
299 |
authority := aString copyFrom:3. |
|
300 |
^ self. |
|
301 |
] ifFalse:[ |
|
302 |
separator := aString at:i. |
|
303 |
authority := aString copyFrom:3 to:i-1. |
|
304 |
]. |
|
1267 | 305 |
(isAbsolute := (aString at:i) == $/). |
1005 | 306 |
] ifFalse:[ |
307 |
(isAbsolute := aString startsWith:$/) ifTrue:[ |
|
308 |
i := 1. |
|
309 |
] ifFalse:[ |
|
310 |
i := 0. |
|
311 |
] |
|
312 |
]. |
|
313 |
||
314 |
[ |
|
315 |
i1 := aString indexOfAny:'/?#' startingAt:i+1. |
|
1254 | 316 |
i1 == 0 ifTrue:[ |path| |
317 |
path := aString copyFrom:i+1. |
|
318 |
path size ~~ 0 ifTrue:[ |
|
319 |
pathSegments add:path. |
|
1257 | 320 |
] ifFalse:[ |
321 |
(aString at:i) == $/ ifTrue:[ |
|
322 |
isDirectory := true |
|
323 |
]. |
|
1254 | 324 |
]. |
1005 | 325 |
^ self. |
326 |
] ifFalse:[ |
|
327 |
separator := aString at:i1. |
|
328 |
pathSegments add:(aString copyFrom:i+1 to:i1-1). |
|
1267 | 329 |
isAbsolute ifTrue:[ |
330 |
pathSegments size == 1 ifTrue:[ |
|
1268 | 331 |
(pathSegments first startsWith:$~) ifTrue:[ |
1267 | 332 |
isAbsolute := false |
333 |
]. |
|
334 |
]. |
|
335 |
]. |
|
1005 | 336 |
i := i1. |
337 |
]. |
|
338 |
] doWhile:[separator == $/]. |
|
339 |
||
340 |
separator == $? ifTrue:[ |
|
341 |
i1 := aString indexOf:$# startingAt:i+1. |
|
342 |
i1 == 0 ifTrue:[ |
|
343 |
query := aString copyFrom:i+1. |
|
344 |
^ self. |
|
345 |
] ifFalse:[ |
|
346 |
separator := aString at:i1. |
|
347 |
query := aString copyFrom:i+1 to:i1-1. |
|
348 |
i := i1. |
|
349 |
]. |
|
350 |
]. |
|
351 |
separator == $# ifTrue:[ |
|
352 |
fragment := aString copyFrom:i+1. |
|
353 |
]. |
|
354 |
||
355 |
" |
|
1267 | 356 |
self new fromString:'//exept~/tmp' |
357 |
self new fromString:'~/tmp' |
|
358 |
self new fromString:'/~/tmp' |
|
1257 | 359 |
self new fromString:'//authority/path1/path2/' |
1005 | 360 |
self new fromString:'//authority/path1/path2?query' |
361 |
self new fromString:'//authority/path1/path2?query#fragment' |
|
362 |
self new fromString:'/path1/path2?query#fragment' |
|
363 |
self new fromString:'/path1/path2#fragment' |
|
364 |
self new fromString:'path1/path2#fragment' |
|
365 |
" |
|
366 |
! |
|
367 |
||
368 |
initialize |
|
369 |
||
370 |
pathSegments := OrderedCollection new. |
|
371 |
! ! |
|
372 |
||
373 |
!HierarchicalURI methodsFor:'printing & storing'! |
|
374 |
||
1268 | 375 |
directoryPath |
376 |
"answer the directory path part of the URI" |
|
377 |
||
378 |
|aStream| |
|
379 |
||
380 |
aStream := WriteStream on:''. |
|
381 |
||
382 |
pathSegments size ~~ 0 ifTrue: [ |
|
383 |
self isAbsolute ifTrue:[ |
|
384 |
aStream nextPut:$/. |
|
385 |
]. |
|
386 |
pathSegments size > 1 ifTrue:[ |
|
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
387 |
(pathSegments copyTo:pathSegments size-1) do:[:p| |
1268 | 388 |
self class escape:p allow:'~;:@&=+",' on:aStream |
389 |
] separatedBy:[ |
|
390 |
aStream nextPut:$/ |
|
391 |
]. |
|
392 |
]. |
|
393 |
]. |
|
394 |
||
395 |
^ aStream contents |
|
396 |
! |
|
397 |
||
1005 | 398 |
path |
399 |
"answer the path part of the URI" |
|
400 |
||
401 |
|aStream| |
|
402 |
||
403 |
aStream := WriteStream on:''. |
|
404 |
||
405 |
pathSegments size ~~ 0 ifTrue: [ |
|
1268 | 406 |
self isAbsolute ifTrue:[ |
1005 | 407 |
aStream nextPut:$/. |
408 |
]. |
|
409 |
pathSegments do:[:p| |
|
1268 | 410 |
self class escape:p allow:'~;:@&=+",' on:aStream |
1005 | 411 |
] separatedBy:[ |
412 |
aStream nextPut:$/ |
|
413 |
]. |
|
414 |
]. |
|
415 |
query notNil ifTrue: [ |
|
416 |
aStream nextPut:$?. |
|
417 |
self class escape:query allow:nil on:aStream |
|
418 |
]. |
|
419 |
fragment notNil ifTrue: [ |
|
420 |
aStream nextPut:$#. |
|
421 |
self class escape:fragment allow:nil on:aStream |
|
422 |
]. |
|
423 |
||
424 |
^ aStream contents |
|
425 |
! |
|
426 |
||
427 |
printOn:aStream |
|
428 |
||
429 |
self printOn:aStream escape:false |
|
430 |
! |
|
431 |
||
432 |
printOn:aStream escape:doEscape |
|
433 |
"print the URI on aStream. If doEscape is set, escape special |
|
434 |
characters" |
|
435 |
||
436 |
super printOn:aStream. |
|
437 |
authority notNil ifTrue: [ |
|
438 |
aStream nextPutAll:'//'. |
|
439 |
doEscape ifTrue:[ |
|
1268 | 440 |
self class escape:authority allow:'~$,;:@&=+' on:aStream |
1005 | 441 |
] ifFalse:[ |
442 |
aStream nextPutAll:authority |
|
443 |
] |
|
444 |
]. |
|
1276 | 445 |
|
446 |
self printPathOn:aStream escape:doEscape. |
|
447 |
! |
|
448 |
||
449 |
printPathOn:aStream escape:doEscape |
|
450 |
"print the path part" |
|
451 |
||
1005 | 452 |
pathSegments size ~~ 0 ifTrue: [ |
1268 | 453 |
self isAbsolute ifTrue:[ |
1005 | 454 |
aStream nextPut:$/. |
455 |
]. |
|
456 |
pathSegments do:[:p| |
|
457 |
doEscape ifTrue:[ |
|
1268 | 458 |
self class escape:p allow:'~;:@&=+",' on:aStream |
1005 | 459 |
] ifFalse:[ |
460 |
aStream nextPutAll:p |
|
461 |
] |
|
462 |
] separatedBy:[ |
|
463 |
aStream nextPut:$/ |
|
464 |
]. |
|
465 |
]. |
|
466 |
query notNil ifTrue: [ |
|
467 |
aStream nextPut:$?. |
|
468 |
doEscape ifTrue:[ |
|
469 |
self class escape:query allow:nil on:aStream |
|
470 |
] ifFalse:[ |
|
471 |
aStream nextPutAll:query |
|
472 |
] |
|
473 |
||
474 |
]. |
|
475 |
fragment notNil ifTrue: [ |
|
476 |
aStream nextPut:$#. |
|
477 |
doEscape ifTrue:[ |
|
478 |
self class escape:fragment allow:nil on:aStream |
|
479 |
] ifFalse:[ |
|
480 |
aStream nextPutAll:fragment |
|
481 |
] |
|
482 |
]. |
|
1276 | 483 |
! |
484 |
||
485 |
publicPrintOn:aStream |
|
486 |
"print, but omit password information" |
|
487 |
||
488 |
|password| |
|
489 |
||
490 |
password := self password. |
|
491 |
password size ~~ 0 ifTrue:[ |
|
1277 | 492 |
super printOn:aStream. |
1276 | 493 |
aStream |
494 |
nextPutAll:'//'; |
|
495 |
nextPutAll:self user; |
|
496 |
nextPut:$@; |
|
497 |
nextPutAll:self host. |
|
1277 | 498 |
self printPathOn:aStream escape:true. |
499 |
] ifFalse:[ |
|
500 |
"no password, use normal printing" |
|
501 |
self printOn:aStream |
|
1276 | 502 |
]. |
1005 | 503 |
! ! |
504 |
||
505 |
!HierarchicalURI methodsFor:'resolution'! |
|
506 |
||
507 |
addComponent:aString |
|
508 |
"concatenate aString to my path" |
|
509 |
||
510 |
(aString = '..' |
|
511 |
and:[pathSegments size ~~ 0 |
|
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
512 |
and:[pathSegments last ~= '..']]) ifTrue:[ |
1005 | 513 |
pathSegments removeLast. |
514 |
] ifFalse:[ |
|
515 |
pathSegments add:aString |
|
516 |
]. |
|
517 |
! |
|
518 |
||
519 |
construct:aString |
|
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
520 |
"concatenate aString to my path" |
1005 | 521 |
|
522 |
^ self copy |
|
523 |
addComponent:aString; |
|
524 |
yourself. |
|
1271
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
525 |
! |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
526 |
|
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
527 |
directory |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
528 |
"remove the last path component" |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
529 |
|
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
530 |
^ self copy |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
531 |
removeLastComponent; |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
532 |
yourself. |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
533 |
! |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
534 |
|
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
535 |
removeLastComponent |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
536 |
"remove the last component" |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
537 |
|
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
538 |
pathSegments size ~~ 0 ifTrue:[ |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
539 |
pathSegments last = '..' ifTrue:[ |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
540 |
pathSegments add:'..'. |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
541 |
] ifFalse:[ |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
542 |
pathSegments removeLast. |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
543 |
]. |
ca2e206e7c7f
Working version: tilde-expansion, patterns
Stefan Vogel <sv@exept.de>
parents:
1268
diff
changeset
|
544 |
]. |
1005 | 545 |
! ! |
546 |
||
547 |
!HierarchicalURI class methodsFor:'documentation'! |
|
548 |
||
549 |
version |
|
1289 | 550 |
^ '$Header: /cvs/stx/stx/libbasic2/HierarchicalURI.st,v 1.9 2003-07-27 17:44:44 stefan Exp $' |
1005 | 551 |
! ! |