equal
deleted
inserted
replaced
29 examples |
29 examples |
30 " |
30 " |
31 |
31 |
32 more examples to be added: |
32 more examples to be added: |
33 [exBegin] |
33 [exBegin] |
34 ... add code fragment for |
34 |u1 u2| |
35 ... executable example here ... |
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. |
36 [exEnd] |
49 [exEnd] |
37 " |
50 " |
38 ! ! |
51 ! ! |
39 |
52 |
40 !HierarchicalURI class methodsFor:'instance creation'! |
53 !HierarchicalURI class methodsFor:'instance creation'! |
62 |
75 |
63 authority:something |
76 authority:something |
64 "set the value of the instance variable 'authority' (automatically generated)" |
77 "set the value of the instance variable 'authority' (automatically generated)" |
65 |
78 |
66 authority := something. |
79 authority := something. |
|
80 ! |
|
81 |
|
82 examples |
|
83 " |
|
84 |
|
85 more examples to be added: |
|
86 [exBegin] |
|
87 URI fromString:'file:/phys/exept/home/tm/tmp' |
|
88 [exEnd] |
|
89 " |
67 ! |
90 ! |
68 |
91 |
69 fragment |
92 fragment |
70 "return the value of the instance variable 'fragment' (automatically generated)" |
93 "return the value of the instance variable 'fragment' (automatically generated)" |
71 |
94 |
201 " |
224 " |
202 (self fromString:'ftp://stefan@www.exept.de:80/test') user |
225 (self fromString:'ftp://stefan@www.exept.de:80/test') user |
203 (self fromString:'ftp://stefan:pass@www.exept.de:80/test') user |
226 (self fromString:'ftp://stefan:pass@www.exept.de:80/test') user |
204 (self fromString:'ftp://www.exept.de:80/test') user |
227 (self fromString:'ftp://www.exept.de:80/test') user |
205 " |
228 " |
|
229 ! ! |
|
230 |
|
231 !HierarchicalURI methodsFor:'copying'! |
|
232 |
|
233 postCopy |
|
234 |
|
235 pathSegments := pathSegments copy |
206 ! ! |
236 ! ! |
207 |
237 |
208 !HierarchicalURI methodsFor:'defaults'! |
238 !HierarchicalURI methodsFor:'defaults'! |
209 |
239 |
210 defaultPort |
240 defaultPort |
252 ] |
282 ] |
253 ]. |
283 ]. |
254 |
284 |
255 [ |
285 [ |
256 i1 := aString indexOfAny:'/?#' startingAt:i+1. |
286 i1 := aString indexOfAny:'/?#' startingAt:i+1. |
257 i1 == 0 ifTrue:[ |
287 i1 == 0 ifTrue:[ |path| |
258 pathSegments add:(aString copyFrom:i+1). |
288 path := aString copyFrom:i+1. |
|
289 path size ~~ 0 ifTrue:[ |
|
290 pathSegments add:path. |
|
291 ]. |
259 ^ self. |
292 ^ self. |
260 ] ifFalse:[ |
293 ] ifFalse:[ |
261 separator := aString at:i1. |
294 separator := aString at:i1. |
262 pathSegments add:(aString copyFrom:i+1 to:i1-1). |
295 pathSegments add:(aString copyFrom:i+1 to:i1-1). |
263 i := i1. |
296 i := i1. |
399 ! ! |
432 ! ! |
400 |
433 |
401 !HierarchicalURI class methodsFor:'documentation'! |
434 !HierarchicalURI class methodsFor:'documentation'! |
402 |
435 |
403 version |
436 version |
404 ^ '$Header: /cvs/stx/stx/libbasic2/HierarchicalURI.st,v 1.1 2002-01-17 14:25:25 stefan Exp $' |
437 ^ '$Header: /cvs/stx/stx/libbasic2/HierarchicalURI.st,v 1.2 2003-06-24 14:10:39 tm Exp $' |
405 ! ! |
438 ! ! |