author | Stefan Vogel <sv@exept.de> |
Fri, 13 Aug 2004 21:30:55 +0200 | |
changeset 2734 | 4934113dc4c0 |
parent 2654 | d6925414a41d |
child 2766 | 04990ee7e604 |
permissions | -rw-r--r-- |
1431 | 1 |
" |
2 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
1780 | 14 |
"{ Package: 'stx:libwidg2' }" |
15 |
||
1390 | 16 |
HierarchicalList subclass:#HierarchicalFileList |
2298
22e95baad346
showCursor and mountPoints instance variables removed
penk
parents:
2297
diff
changeset
|
17 |
instanceVariableNames:'matchBlock indicatorList indicatorTask sortBlock' |
2138 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Views-Support' |
|
1390 | 21 |
! |
22 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
23 |
HierarchicalItem subclass:#HierarchicalFileItem |
2297 | 24 |
instanceVariableNames:'icon contentsItem' |
2293 | 25 |
classVariableNames:'LastUIDToUserNameMapping LastGIDToGroupNameMapping' |
2138 | 26 |
poolDictionaries:'' |
27 |
privateIn:HierarchicalFileList |
|
1390 | 28 |
! |
29 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
30 |
HierarchicalFileList::HierarchicalFileItem subclass:#File |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
31 |
instanceVariableNames:'' |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
32 |
classVariableNames:'' |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
33 |
poolDictionaries:'' |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
34 |
privateIn:HierarchicalFileList |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
35 |
! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
36 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
37 |
HierarchicalFileList::HierarchicalFileItem subclass:#Directory |
2475 | 38 |
instanceVariableNames:'modificationTime makeIconGray quickChildrenInfo' |
39 |
classVariableNames:'StateUnknown StateHasChildren StateHasNoChildren StateFetching' |
|
2138 | 40 |
poolDictionaries:'' |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
41 |
privateIn:HierarchicalFileList |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
42 |
! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
43 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
44 |
HierarchicalFileList::Directory subclass:#RemoteDirectory |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
45 |
instanceVariableNames:'' |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
46 |
classVariableNames:'' |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
47 |
poolDictionaries:'' |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
48 |
privateIn:HierarchicalFileList |
1390 | 49 |
! |
50 |
||
1431 | 51 |
!HierarchicalFileList class methodsFor:'documentation'! |
52 |
||
53 |
copyright |
|
54 |
" |
|
55 |
COPYRIGHT (c) 1999 by eXept Software AG |
|
56 |
All Rights Reserved |
|
57 |
||
58 |
This software is furnished under a license and may be used |
|
59 |
only in accordance with the terms of that license and with the |
|
60 |
inclusion of the above copyright notice. This software may not |
|
61 |
be provided or otherwise made available to, or used by, any |
|
62 |
other person. No title to or ownership of the software is |
|
63 |
hereby transferred. |
|
64 |
" |
|
65 |
||
66 |
! ! |
|
1390 | 67 |
|
68 |
!HierarchicalFileList class methodsFor:'examples'! |
|
69 |
||
2180 | 70 |
examples |
2130 | 71 |
" |
2306 | 72 |
open filebrowser without monitoring cycle |
73 |
||
2180 | 74 |
[exBegin] |
2306 | 75 |
|top sel list directory| |
1390 | 76 |
|
77 |
list := HierarchicalFileList new. |
|
78 |
list showRoot:false. |
|
2130 | 79 |
list matchBlock:[:fn :isDir| true ]. |
1390 | 80 |
|
2306 | 81 |
directory := Filename currentDirectory. |
82 |
directory := Filename homeDirectory. |
|
83 |
||
84 |
list directory:(directory asAbsoluteFilename). |
|
85 |
||
1390 | 86 |
top := StandardSystemView new; extent:300@300. |
87 |
sel := ScrollableView for:HierarchicalListView miniScroller:true |
|
88 |
origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
89 |
||
90 |
sel doubleClickAction:[:i| (list at:i) toggleExpand ]. |
|
91 |
sel indicatorAction:[:i| (list at:i) toggleExpand ]. |
|
92 |
||
2296 | 93 |
sel hasConstantHeight:true. |
2259 | 94 |
sel list:list. |
95 |
||
1390 | 96 |
top open. |
2259 | 97 |
[exEnd] |
2306 | 98 |
|
99 |
||
100 |
open filebrowser and monitore contents |
|
101 |
[exBegin] |
|
102 |
|top sel list directory| |
|
103 |
||
104 |
list := HierarchicalFileList new. |
|
105 |
list showRoot:false. |
|
106 |
list matchBlock:[:fn :isDir| true ]. |
|
107 |
||
108 |
directory := Filename currentDirectory. |
|
109 |
directory := Filename homeDirectory. |
|
110 |
||
111 |
list directory:(directory asAbsoluteFilename). |
|
112 |
||
113 |
top := StandardSystemView new; extent:300@300. |
|
114 |
sel := ScrollableView for:HierarchicalListView miniScroller:true |
|
115 |
origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
116 |
||
117 |
sel doubleClickAction:[:i| (list at:i) toggleExpand ]. |
|
118 |
sel indicatorAction:[:i| (list at:i) toggleExpand ]. |
|
119 |
||
120 |
sel hasConstantHeight:true. |
|
121 |
sel list:list. |
|
122 |
list monitoringTaskDelay:0.5. |
|
123 |
top open. |
|
124 |
[exEnd] |
|
125 |
||
2180 | 126 |
" |
1390 | 127 |
! ! |
128 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
129 |
!HierarchicalFileList class methodsFor:'helpers'! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
130 |
|
2293 | 131 |
forInfoItem:aItem |
132 |
"instance creation helper |
|
133 |
" |
|
134 |
| info fileType retItem| |
|
135 |
||
136 |
info := aItem info. |
|
137 |
fileType := aItem type. |
|
138 |
retItem := self itemFor:aItem fileName fileType:fileType. |
|
139 |
retItem fileInfo:info. |
|
140 |
^ retItem |
|
141 |
! |
|
142 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
143 |
itemFor:aFileOrDirectoryName fileType:fileType |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
144 |
"instance creation helper |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
145 |
" |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
146 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
147 |
fileType == #directory ifTrue:[ |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
148 |
^ Directory fileName:aFileOrDirectoryName. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
149 |
]. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
150 |
fileType == #remoteDirectory ifTrue:[ |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
151 |
^ RemoteDirectory fileName:aFileOrDirectoryName. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
152 |
]. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
153 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
154 |
^ File fileName:aFileOrDirectoryName. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
155 |
! ! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
156 |
|
1390 | 157 |
!HierarchicalFileList methodsFor:'accessing'! |
158 |
||
159 |
directory |
|
160 |
"returns the root directory or nil |
|
161 |
" |
|
162 |
^ root notNil ifTrue:[root fileName] ifFalse:[nil] |
|
163 |
||
164 |
! |
|
165 |
||
166 |
directory:aDirectory |
|
167 |
"set the root directory or nil |
|
168 |
" |
|
2272 | 169 |
self directory:aDirectory expand:true |
170 |
! |
|
171 |
||
172 |
directory:aDirectory expand:doExpand |
|
2388 | 173 |
"set the root directory or nil; reuse old |
174 |
items if existant |
|
2272 | 175 |
" |
2388 | 176 |
|oldDir newDir oldRoot newRoot index changeToParent children| |
2294 | 177 |
|
2388 | 178 |
( aDirectory isNil |
179 |
or:[(newDir := aDirectory asFilename) exists not] |
|
180 |
) ifTrue:[ |
|
2294 | 181 |
self root:nil. |
2388 | 182 |
^ self |
1390 | 183 |
]. |
2299 | 184 |
|
2388 | 185 |
newDir isDirectory ifFalse:[ |
186 |
newDir := newDir directory |
|
187 |
]. |
|
188 |
newDir := newDir asCanonicalizedFilename. |
|
189 |
oldDir := self directory. |
|
190 |
||
191 |
oldDir = newDir ifTrue:[^ self]. |
|
192 |
oldRoot := root. |
|
193 |
||
194 |
changeToParent := false. |
|
195 |
||
196 |
oldDir notNil ifTrue:[ |
|
197 |
oldDir directory = newDir ifTrue:[ |
|
198 |
changeToParent := true. |
|
199 |
] ifFalse:[ |
|
200 |
"search for existing item |
|
201 |
" |
|
202 |
self do:[:el| |
|
203 |
el fileName = newDir ifTrue:[ |
|
204 |
el parent:nil. |
|
205 |
self root:el. |
|
206 |
doExpand ifTrue:[ el expand ]. |
|
207 |
^ self |
|
208 |
]. |
|
209 |
]. |
|
210 |
]. |
|
211 |
]. |
|
212 |
newRoot := HierarchicalFileItem fileName:newDir. |
|
213 |
newRoot setExpanded:false. "/ to supress change notifications |
|
214 |
self root:newRoot. |
|
215 |
||
216 |
children := newRoot children ? #(). |
|
217 |
||
218 |
"/ disable <cd ..> handling |
|
219 |
changeToParent := false. |
|
220 |
||
221 |
changeToParent ifTrue:[ |
|
222 |
index := children findFirst:[:el| el fileName = oldDir ]. |
|
223 |
index ~~ 0 ifTrue:[ newRoot at:index put:oldRoot ]. |
|
224 |
]. |
|
2475 | 225 |
doExpand ifTrue:[ newRoot enforcedExpand ]. |
2259 | 226 |
! |
227 |
||
228 |
root:aRoot |
|
229 |
"stop update-task |
|
230 |
" |
|
231 |
self criticalDo:[ |
|
2306 | 232 |
indicatorList notNil ifTrue:[ |
2259 | 233 |
indicatorList do:[:el| el resetFetchIndicator ]. |
234 |
indicatorList removeAll. |
|
235 |
] |
|
236 |
]. |
|
2306 | 237 |
aRoot notNil ifTrue:[ |
2267 | 238 |
self showRoot ifFalse:[aRoot setExpanded:true ] |
2259 | 239 |
]. |
240 |
^ super root:aRoot |
|
1390 | 241 |
! ! |
242 |
||
243 |
!HierarchicalFileList methodsFor:'actions'! |
|
244 |
||
245 |
matchBlock |
|
246 |
"set the matchBlock - if non-nil, it controls which files are visible. |
|
247 |
" |
|
248 |
^ matchBlock |
|
249 |
||
250 |
! |
|
251 |
||
252 |
matchBlock:aBlock |
|
253 |
"set the matchBlock - if non-nil, it controls which files are visible. |
|
254 |
" |
|
255 |
matchBlock := aBlock. |
|
1866 | 256 |
|
257 |
root notNil ifTrue:[ |
|
1867 | 258 |
self recursionLock critical:[ |
259 |
self stopMonitoringTask. |
|
260 |
root matchBlockChanged. |
|
261 |
]. |
|
262 |
self startMonitoringTask. |
|
1866 | 263 |
]. |
1867 | 264 |
|
2293 | 265 |
! |
266 |
||
267 |
sortBlock |
|
268 |
"set the matchBlock - if non-nil, it controls which files are visible. |
|
269 |
" |
|
2296 | 270 |
sortBlock notNil ifTrue:[ ^ sortBlock ]. |
271 |
||
272 |
sortBlock := [:a :b| |aIsDir| |
|
273 |
aIsDir := a isDirectory. |
|
274 |
aIsDir == b isDirectory ifTrue:[a fileName name <= b fileName name] |
|
275 |
ifFalse:[aIsDir]. |
|
2293 | 276 |
]. |
277 |
^ sortBlock |
|
278 |
! |
|
279 |
||
280 |
sortBlock:aBlock |
|
281 |
"set the matchBlock - if non-nil, it controls which files are visible. |
|
282 |
" |
|
283 |
sortBlock := aBlock. |
|
284 |
||
285 |
root notNil ifTrue:[ |
|
286 |
self recursionLock critical:[ |
|
287 |
self stopMonitoringTask. |
|
2294 | 288 |
root recursiveSort:aBlock. |
2293 | 289 |
]. |
290 |
self startMonitoringTask. |
|
291 |
]. |
|
1390 | 292 |
! ! |
293 |
||
2493 | 294 |
!HierarchicalFileList methodsFor:'private-monitoring task'! |
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
295 |
|
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
296 |
monitoringCycle |
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
297 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
298 |
self monitoringCycle:false |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
299 |
! |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
300 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
301 |
monitoringCycle:update |
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
302 |
"the block evaluated by the monitoring task; test whether directory is expanded |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
303 |
otherwise we have not to evaluate the directory contents. |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
304 |
think about remote file-systems |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
305 |
" |
2380 | 306 |
|index item| |
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
307 |
|
2429 | 308 |
item := root. |
309 |
item isNil ifTrue:[^ self]. |
|
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
310 |
|
2429 | 311 |
self showRoot ifTrue:[ index := 2 ] "/ root is part of list (discard first entry) |
312 |
ifFalse:[ index := 1 ]. "/ root not part of list |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
313 |
|
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
314 |
[item notNil] whileTrue:[ |
2380 | 315 |
dependents size == 0 ifTrue:[ ^ self ]. |
316 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
317 |
item isDirectory ifTrue:[ |
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
318 |
update ifTrue:[ |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
319 |
item modificationTime:nil. |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
320 |
]. |
2267 | 321 |
item monitoringCycle |
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
322 |
]. |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
323 |
Processor yield. |
2429 | 324 |
item := self at:index ifAbsent:nil. |
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
325 |
index := index + 1. |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
326 |
]. |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
327 |
! ! |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
328 |
|
1390 | 329 |
!HierarchicalFileList methodsFor:'protocol'! |
330 |
||
331 |
childrenFor:anItem |
|
332 |
"returns all visible children derived from the physical |
|
333 |
directory contents. |
|
334 |
" |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
335 |
|contents list matchBlock| |
1390 | 336 |
|
2130 | 337 |
anItem isDirectory ifFalse:[^ #()]. |
1390 | 338 |
|
2248 | 339 |
contents := DirectoryContents directoryNamed:anItem fileName. |
2306 | 340 |
contents isNil ifTrue:[ ^ #() ]. |
1390 | 341 |
|
2248 | 342 |
list := OrderedCollection new. |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
343 |
matchBlock := self matchBlockFor:anItem. |
2130 | 344 |
|
2297 | 345 |
contents itemsDo:[:anItem| |
346 |
(matchBlock isNil or:[matchBlock value:(anItem fileName) value:(anItem isDirectory)]) ifTrue:[ |
|
347 |
list add:(HierarchicalFileItem forContentsItem:anItem). |
|
1390 | 348 |
] |
349 |
]. |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
350 |
|
2130 | 351 |
list isEmpty ifTrue:[^ #()]. |
2293 | 352 |
list sort:self sortBlock. |
2248 | 353 |
^ list |
1390 | 354 |
! |
355 |
||
356 |
hasChildrenFor:anItem |
|
357 |
"returns true if the physical directory contains at least |
|
358 |
one visible item otherwise false. |
|
359 |
" |
|
360 |
|block| |
|
361 |
||
362 |
anItem isDirectory ifFalse:[ |
|
363 |
^ false |
|
364 |
]. |
|
365 |
||
366 |
(block := self matchBlockFor:anItem) isNil ifTrue:[ |
|
367 |
block := [:aFilename :isDirectory| true ] |
|
368 |
]. |
|
369 |
^ DirectoryContents directoryNamed:(anItem fileName) detect:block |
|
370 |
! |
|
371 |
||
372 |
matchBlockFor:anItem |
|
373 |
"get the matchBlock - if non-nil, it controls which files are |
|
374 |
visible within the physical directory |
|
375 |
" |
|
376 |
^ matchBlock |
|
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
377 |
! |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
378 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
379 |
updateList |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
380 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
381 |
self monitoringCycle:true |
1390 | 382 |
! ! |
383 |
||
1581 | 384 |
!HierarchicalFileList methodsFor:'searching'! |
385 |
||
2272 | 386 |
findLastForFile:aPathOrFile |
387 |
"find last item which matches the path or file |
|
388 |
returns the item or nil if not contained in self |
|
1581 | 389 |
" |
2272 | 390 |
|file searchItem rootDir rootComponents searchComponents| |
1581 | 391 |
|
2272 | 392 |
(aPathOrFile isNil or:[root isNil]) ifTrue:[ |
1582 | 393 |
^ nil |
1581 | 394 |
]. |
395 |
||
2272 | 396 |
file := aPathOrFile asFilename. |
397 |
file exists ifFalse:[ ^ nil ]. |
|
1581 | 398 |
|
2272 | 399 |
rootDir := root fileName asAbsoluteFilename. |
2290
29e279812a45
search not for absoluteFilename in searchItem to get the link files
penk
parents:
2272
diff
changeset
|
400 |
"/ file := file asAbsoluteFilename. |
2272 | 401 |
|
1581 | 402 |
|
2290
29e279812a45
search not for absoluteFilename in searchItem to get the link files
penk
parents:
2272
diff
changeset
|
403 |
"/ (file pathName startsWith:(rootDir pathName)) ifFalse:[ |
29e279812a45
search not for absoluteFilename in searchItem to get the link files
penk
parents:
2272
diff
changeset
|
404 |
(file asString startsWith:(rootDir pathName)) ifFalse:[ |
2272 | 405 |
"not included" |
406 |
^ nil |
|
1581 | 407 |
]. |
2272 | 408 |
rootComponents := rootDir components. |
2299 | 409 |
searchComponents := file asCanonicalizedFilename components. |
2272 | 410 |
searchItem := root. |
1581 | 411 |
|
2272 | 412 |
searchComponents from:(rootComponents size + 1) do:[:aName| |child| |
413 |
child := searchItem detect:[:el| el baseName = aName ] ifNone:nil. |
|
414 |
||
415 |
child isNil ifTrue:[ ^ searchItem ]. |
|
416 |
searchItem := child. |
|
1581 | 417 |
]. |
2272 | 418 |
^ searchItem |
1581 | 419 |
! ! |
420 |
||
2259 | 421 |
!HierarchicalFileList methodsFor:'update'! |
422 |
||
423 |
startIndicatorValidationFor:anItem |
|
424 |
"an item will be registered for an indication update |
|
425 |
" |
|
426 |
|prio| |
|
427 |
||
428 |
self criticalDo:[ |
|
429 |
indicatorList size == 0 ifTrue:[ |
|
430 |
indicatorList := OrderedCollection new. |
|
431 |
] ifFalse:[ |
|
432 |
indicatorList removeIdentical:anItem ifAbsent:nil. |
|
433 |
]. |
|
434 |
"/ indicatorList addFirst:anItem. |
|
435 |
indicatorList add:anItem. |
|
436 |
||
2306 | 437 |
indicatorTask isNil ifTrue:[ |
2259 | 438 |
prio := Processor activePriority. |
439 |
indicatorTask := [ self updateIndicatorCycle. ] forkAt:(prio - 1). |
|
440 |
indicatorTask priorityRange:(prio-1 to:prio). |
|
441 |
] |
|
442 |
]. |
|
443 |
! |
|
444 |
||
445 |
stopIndicatorValidationFor:anItem |
|
446 |
"stop the indicator validation for an item |
|
447 |
" |
|
448 |
self criticalDo:[ |
|
2306 | 449 |
indicatorList notNil ifTrue:[ |
2259 | 450 |
indicatorList removeIdentical:anItem ifAbsent:nil. |
451 |
anItem resetFetchIndicator. |
|
452 |
] |
|
453 |
]. |
|
454 |
! |
|
455 |
||
456 |
updateIndicatorCycle |
|
457 |
"run fetching indicator task cycle. |
|
458 |
This is done in the background to avoid long startup |
|
459 |
delays, in case the indicator information takes long to |
|
2510
ba2eed40ba9f
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
2493
diff
changeset
|
460 |
gather (i.e. when reading directories)" |
ba2eed40ba9f
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
2493
diff
changeset
|
461 |
|
2259 | 462 |
|repeat task item| |
463 |
||
464 |
repeat := true. |
|
465 |
task := indicatorTask. |
|
466 |
||
467 |
[ [ task notNil ] whileTrue:[ |
|
468 |
self criticalDo:[ |
|
469 |
( dependents size ~~ 0 "/ no dependencies (stop task) |
|
470 |
and:[indicatorList size ~~ 0] "/ nothing to do |
|
471 |
) ifTrue:[ |
|
472 |
item := indicatorList removeFirst. |
|
473 |
||
474 |
(self includesIdentical:item) ifFalse:[ |
|
2475 | 475 |
"/ item is no longer visible |
2259 | 476 |
item resetFetchIndicator. |
477 |
item := nil |
|
478 |
] |
|
479 |
] ifFalse:[ |
|
480 |
item := indicatorTask := task := nil |
|
481 |
] |
|
482 |
]. |
|
2306 | 483 |
item notNil ifTrue:[ |
2259 | 484 |
item fetchIndicator. |
485 |
Processor yield. |
|
486 |
]. |
|
487 |
] |
|
2510
ba2eed40ba9f
Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents:
2493
diff
changeset
|
488 |
] ensure:[ |
2306 | 489 |
task notNil ifTrue:[ |
2259 | 490 |
"/ oops, process terminated |
491 |
self criticalDo:[ |
|
492 |
"/ test whether a new task already started |
|
493 |
indicatorTask == task ifTrue:[ |
|
494 |
indicatorTask := nil |
|
495 |
] |
|
496 |
] |
|
497 |
] |
|
498 |
]. |
|
499 |
! ! |
|
500 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
501 |
!HierarchicalFileList::HierarchicalFileItem class methodsFor:'instance creation'! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
502 |
|
2297 | 503 |
fileName:aFileName |
504 |
^ self forContentsItem:(DirectoryContents contentsItemForFileName:aFileName) |
|
505 |
! |
|
506 |
||
2299 | 507 |
forContentsItem:aContentsItem |
2294 | 508 |
|item cls| |
509 |
||
2299 | 510 |
cls := HierarchicalFileList::File. |
511 |
||
512 |
aContentsItem notNil ifTrue:[ |
|
513 |
aContentsItem isRemoteDirectory ifTrue:[ |
|
514 |
cls := HierarchicalFileList::RemoteDirectory |
|
2294 | 515 |
] ifFalse:[ |
2299 | 516 |
aContentsItem isDirectory ifTrue:[ |
517 |
cls := HierarchicalFileList::Directory |
|
518 |
] |
|
519 |
]. |
|
2294 | 520 |
]. |
521 |
item := cls basicNew initialize. |
|
2299 | 522 |
item contentsItem:aContentsItem. |
2297 | 523 |
^ item |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
524 |
! |
1390 | 525 |
|
2294 | 526 |
new |
527 |
self error. |
|
1390 | 528 |
! ! |
529 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
530 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'accessing'! |
1390 | 531 |
|
532 |
baseName |
|
533 |
"returns the baseName |
|
534 |
" |
|
2297 | 535 |
^ contentsItem fileName baseName. |
536 |
! |
|
537 |
||
538 |
contentsItem:aContentsItem |
|
539 |
contentsItem := aContentsItem |
|
2293 | 540 |
! |
541 |
||
1390 | 542 |
fileName |
543 |
"returns the fileName |
|
544 |
" |
|
2297 | 545 |
^ contentsItem fileName |
1390 | 546 |
! |
547 |
||
2294 | 548 |
fileName:aFilename |
2297 | 549 |
self halt. |
550 |
contentsItem := DirectoryContents contentsItemForFileName:aFilename |
|
551 |
||
552 |
"/ fileName = aFilename ifFalse:[ |
|
553 |
"/ fileName := aFilename. |
|
554 |
"/ self changed:#label |
|
555 |
"/ ]. |
|
1390 | 556 |
! |
557 |
||
2293 | 558 |
fileSize |
559 |
"returns the fileSize |
|
560 |
" |
|
2297 | 561 |
|fileInfo| |
562 |
||
563 |
fileInfo := contentsItem info. |
|
2293 | 564 |
fileInfo isNil ifTrue:[^ nil]. |
2297 | 565 |
^ fileInfo fileSize |
2293 | 566 |
! |
2267 | 567 |
|
2293 | 568 |
group |
569 |
"returns the printable group |
|
570 |
" |
|
2297 | 571 |
|fileInfo gid group| |
2294 | 572 |
|
2297 | 573 |
fileInfo := contentsItem info. |
2294 | 574 |
fileInfo notNil ifTrue:[ |
575 |
gid := fileInfo gid. |
|
2293 | 576 |
|
2294 | 577 |
gid notNil ifTrue:[ |
578 |
(LastGIDToGroupNameMapping notNil and:[gid == LastGIDToGroupNameMapping key]) ifTrue:[ |
|
579 |
^ LastGIDToGroupNameMapping value |
|
580 |
]. |
|
2293 | 581 |
group := OperatingSystem getGroupNameFromID:gid. |
582 |
LastGIDToGroupNameMapping := gid -> group. |
|
2294 | 583 |
^ group |
2293 | 584 |
] |
2267 | 585 |
]. |
2294 | 586 |
^ '???' |
2267 | 587 |
! |
588 |
||
1390 | 589 |
icon |
590 |
"returns the icon key |
|
591 |
" |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
592 |
icon isNil ifTrue:[ |
2387 | 593 |
self isRemoteDirectory ifTrue:[ |
594 |
icon := FileBrowser iconForKeyMatching:#directoryNetwork |
|
595 |
] ifFalse:[ |
|
596 |
icon := FileBrowser iconForFile:(self fileName). |
|
597 |
] |
|
1390 | 598 |
]. |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
599 |
^ icon. |
1390 | 600 |
! |
601 |
||
602 |
label |
|
603 |
"returns the printable name, the baseName |
|
604 |
" |
|
2297 | 605 |
^ contentsItem fileName baseName |
1390 | 606 |
! |
607 |
||
2293 | 608 |
modificationTime |
609 |
"returns the absolute time of modification |
|
610 |
" |
|
2297 | 611 |
|
612 |
|fileInfo| |
|
613 |
||
614 |
fileInfo := contentsItem info. |
|
2293 | 615 |
fileInfo isNil ifTrue:[^ nil]. |
2297 | 616 |
^ fileInfo modificationTime |
2293 | 617 |
! |
618 |
||
619 |
owner |
|
620 |
"returns the printable owner |
|
621 |
" |
|
2297 | 622 |
|fileInfo uid owner| |
2294 | 623 |
|
2297 | 624 |
fileInfo := contentsItem info. |
2294 | 625 |
fileInfo notNil ifTrue:[ |
626 |
uid := fileInfo uid. |
|
2293 | 627 |
|
2294 | 628 |
uid notNil ifTrue:[ |
629 |
(LastUIDToUserNameMapping notNil and:[uid == LastUIDToUserNameMapping key]) ifTrue:[ |
|
630 |
^ LastUIDToUserNameMapping value |
|
631 |
]. |
|
2293 | 632 |
owner := OperatingSystem getUserNameFromID:uid. |
633 |
LastUIDToUserNameMapping := uid -> owner. |
|
2294 | 634 |
^ owner |
2293 | 635 |
] |
636 |
]. |
|
2294 | 637 |
|
638 |
^ '???' |
|
2293 | 639 |
! |
640 |
||
1390 | 641 |
pathName |
642 |
"returns the pathName |
|
643 |
" |
|
2297 | 644 |
^ contentsItem fileName pathName |
2267 | 645 |
! |
646 |
||
2293 | 647 |
permissions |
648 |
"returns the permissions as printable string |
|
649 |
" |
|
2297 | 650 |
|fileInfo mode perms| |
2267 | 651 |
|
2297 | 652 |
fileInfo := contentsItem info. |
2294 | 653 |
fileInfo notNil ifTrue:[ |
654 |
mode := fileInfo mode. |
|
655 |
||
656 |
mode notNil ifTrue:[ |
|
657 |
perms := String new:9 withAll:$-. |
|
2293 | 658 |
|
2294 | 659 |
1 to:9 by:3 do:[:i| |
660 |
(mode bitAt:i ) == 1 ifTrue:[perms at:10 - i put:$x]. |
|
661 |
(mode bitAt:i + 1) == 1 ifTrue:[perms at:9 - i put:$w]. |
|
662 |
(mode bitAt:i + 2) == 1 ifTrue:[perms at:8 - i put:$r]. |
|
663 |
]. |
|
664 |
^ perms |
|
665 |
] |
|
2293 | 666 |
]. |
2294 | 667 |
^ '???' |
2293 | 668 |
! |
669 |
||
670 |
suffix |
|
671 |
"returns the suffix of the file |
|
672 |
" |
|
2294 | 673 |
(OperatingSystem isUNIXlike and:[(self baseName at:1) == $.]) ifTrue:[ |
674 |
^ '' |
|
2267 | 675 |
]. |
2297 | 676 |
^ contentsItem fileName suffix |
2294 | 677 |
! ! |
678 |
||
679 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'change & update'! |
|
680 |
||
681 |
changed:aParameter |
|
682 |
"the item changed; raise change notification |
|
683 |
" |
|
684 |
aParameter == #icon ifTrue:[ icon := nil ]. |
|
685 |
super changed:aParameter. |
|
686 |
! ! |
|
687 |
||
688 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'instance creation'! |
|
689 |
||
690 |
fileName:aFilename fileInfo:aFileInfoOrNil |
|
2297 | 691 |
self halt. |
692 |
"/ fileName := aFilename. |
|
693 |
"/ fileInfo := aFileInfoOrNil. |
|
1390 | 694 |
! ! |
695 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
696 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'invalidate'! |
1390 | 697 |
|
698 |
invalidate |
|
699 |
"invalidate the contents |
|
700 |
" |
|
701 |
self invalidateRepairNow:false |
|
702 |
||
703 |
! |
|
704 |
||
705 |
invalidateRepairNow |
|
706 |
"invalidate the contents; repair now |
|
707 |
" |
|
708 |
self invalidateRepairNow:true |
|
709 |
||
710 |
! |
|
711 |
||
712 |
invalidateRepairNow:doRepair |
|
713 |
"invalidate the contents; dependent on the boolean |
|
714 |
do repair immediately |
|
715 |
" |
|
716 |
||
717 |
||
1866 | 718 |
! |
719 |
||
720 |
matchBlockChanged |
|
721 |
"called if the matchBlock changed |
|
722 |
" |
|
723 |
||
1390 | 724 |
! ! |
725 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
726 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'printing'! |
2127 | 727 |
|
2479 | 728 |
printOn:aStream |
729 |
super printOn:aStream. |
|
730 |
' for: ' printOn:aStream. |
|
731 |
self fileName printOn:aStream |
|
732 |
! |
|
733 |
||
2127 | 734 |
printString |
735 |
||
736 |
^ super printString, ' for: ', self fileName asString |
|
737 |
! ! |
|
738 |
||
2270 | 739 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'protocol'! |
740 |
||
741 |
flushChildren |
|
742 |
"flush the children because node not visible .... |
|
743 |
canbe redefined by subclass |
|
744 |
" |
|
745 |
children := nil. |
|
746 |
! ! |
|
747 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
748 |
!HierarchicalFileList::HierarchicalFileItem methodsFor:'queries'! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
749 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
750 |
isDirectory |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
751 |
^ false |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
752 |
! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
753 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
754 |
isRemoteDirectory |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
755 |
^ false |
2267 | 756 |
! |
757 |
||
758 |
time |
|
759 |
||
760 |
^ self valueAt:#modified |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
761 |
! ! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
762 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
763 |
!HierarchicalFileList::File methodsFor:'accessing'! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
764 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
765 |
children |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
766 |
"always returns an empty list |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
767 |
" |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
768 |
^ #() |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
769 |
! ! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
770 |
|
1390 | 771 |
!HierarchicalFileList::File methodsFor:'queries'! |
772 |
||
773 |
hasChildren |
|
774 |
"always returns false |
|
775 |
" |
|
776 |
^ false |
|
777 |
! ! |
|
778 |
||
2259 | 779 |
!HierarchicalFileList::Directory class methodsFor:'documentation'! |
780 |
||
781 |
documentation |
|
782 |
" |
|
783 |
[Instance variables:] |
|
784 |
||
2267 | 785 |
fetchOperation <Symbol/Boolean> nil if children is nil, no information about has children |
786 |
#fetching registered in list to be updated for indication |
|
787 |
#hasChildren registered in list to be updated for indication |
|
788 |
#hasNoChildren has children but children list might be nil (remote) |
|
2259 | 789 |
" |
790 |
! ! |
|
791 |
||
2475 | 792 |
!HierarchicalFileList::Directory class methodsFor:'initialization'! |
793 |
||
794 |
initialize |
|
795 |
StateUnknown := nil. |
|
796 |
StateHasChildren := #hasChildren. |
|
797 |
StateHasNoChildren := #hasNoChildren. |
|
798 |
StateFetching := #fetching |
|
799 |
||
800 |
" |
|
801 |
self initialize |
|
802 |
" |
|
803 |
! ! |
|
804 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
805 |
!HierarchicalFileList::Directory methodsFor:'accessing'! |
1390 | 806 |
|
807 |
children |
|
808 |
"returns the list of children |
|
809 |
" |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
810 |
|model| |
1390 | 811 |
|
2306 | 812 |
children notNil ifTrue:[ ^ children ]. |
1390 | 813 |
|
2259 | 814 |
model := self model. |
2306 | 815 |
model isNil ifTrue:[ ^ nil ]. |
1390 | 816 |
|
2259 | 817 |
model criticalDo:[ |
2306 | 818 |
children isNil ifTrue:[ self readChildren ]. |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
819 |
]. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
820 |
^ children |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
821 |
! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
822 |
|
2475 | 823 |
icon |
824 |
"returns the icon |
|
2270 | 825 |
" |
2475 | 826 |
|
827 |
|nameKey| |
|
2270 | 828 |
|
2387 | 829 |
isExpanded ifTrue:[ |
2475 | 830 |
(makeIconGray == true) ifTrue:[ |
831 |
nameKey := #directoryOpenGray |
|
832 |
] ifFalse:[ |
|
833 |
nameKey := #directoryOpen |
|
834 |
] |
|
835 |
] ifFalse:[ |
|
2428 | 836 |
makeIconGray == true ifTrue:[ |
2475 | 837 |
nameKey := #directoryGray |
838 |
] |
|
2387 | 839 |
]. |
2475 | 840 |
|
841 |
nameKey notNil ifTrue:[ |
|
842 |
^ FileBrowser iconForKeyMatching:nameKey |
|
2428 | 843 |
]. |
2475 | 844 |
|
2387 | 845 |
icon isNil ifTrue:[ |
846 |
^ super icon |
|
847 |
]. |
|
848 |
^ icon |
|
849 |
! |
|
850 |
||
2457 | 851 |
label |
852 |
"returns the printable name, the baseName |
|
853 |
" |
|
2654 | 854 |
parent isHierarchicalItem ifFalse:[ |
855 |
"no parent exists, thus we have to test for rootDirectory |
|
856 |
" |
|
857 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
858 |
contentsItem fileName isRootDirectory ifTrue:[ |
|
859 |
^ contentsItem fileName pathName |
|
860 |
] |
|
861 |
]. |
|
2457 | 862 |
]. |
863 |
^ contentsItem fileName baseName |
|
864 |
! |
|
865 |
||
2428 | 866 |
makeIconGray:something |
2475 | 867 |
"set/clear the flag which enforces the icon to be shown in grey" |
2428 | 868 |
|
869 |
makeIconGray := something. |
|
870 |
! |
|
871 |
||
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
872 |
modificationTime:something |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
873 |
"set the value of the instance variable 'modificationTime' (automatically generated)" |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
874 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
875 |
modificationTime := something. |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
876 |
! |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
877 |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
878 |
readChildren |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
879 |
"reads the list of children |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
880 |
" |
2259 | 881 |
|model list hadChildren hasChildren| |
882 |
||
2475 | 883 |
self forgetAboutChildren. |
884 |
||
2259 | 885 |
model := self model. |
2306 | 886 |
model isNil ifTrue:[ |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
887 |
"/ must reread later |
2475 | 888 |
modificationTime := children := nil. |
889 |
^ nil |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
890 |
]. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
891 |
|
2259 | 892 |
hadChildren := children size ~~ 0. |
893 |
||
894 |
"/ set to suppress reading of children |
|
1867 | 895 |
children := #(). |
2297 | 896 |
modificationTime := self fileName modificationTime. |
2259 | 897 |
model stopIndicatorValidationFor:self. |
898 |
||
1867 | 899 |
list := model childrenFor:self. |
900 |
||
901 |
list size ~~ 0 ifTrue:[ |
|
902 |
list do:[:aChild| aChild parent:self]. |
|
903 |
children := list. |
|
1390 | 904 |
]. |
2259 | 905 |
hasChildren := children size ~~ 0. |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
906 |
|
2259 | 907 |
hasChildren ~~ hadChildren ifTrue:[ |
908 |
self changed:#redraw |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
909 |
]. |
1390 | 910 |
^ children |
911 |
! ! |
|
912 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
913 |
!HierarchicalFileList::Directory methodsFor:'accessing-hierarchy'! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
914 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
915 |
collapse |
2270 | 916 |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
917 |
super collapse. |
2270 | 918 |
|
919 |
children notNil ifTrue:[ |
|
920 |
children do:[:el| el flushChildren ] |
|
921 |
]. |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
922 |
! |
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
923 |
|
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
924 |
expand |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
925 |
"expand children; must redefine to raise a notification |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
926 |
if children are not yet initialized and after initialization empty. |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
927 |
" |
2270 | 928 |
|
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
929 |
super expand. |
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
930 |
! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
931 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
932 |
recursiveCollapse |
2270 | 933 |
|
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
934 |
super recursiveCollapse. |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
935 |
! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
936 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
937 |
recursiveExpand |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
938 |
"redefined to expand |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
939 |
" |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
940 |
self expand |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
941 |
|
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
942 |
|
2104
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
943 |
! ! |
327f2f77ec12
support remote file-systems (not reading contents of directory if not yet initialized)
ca
parents:
2095
diff
changeset
|
944 |
|
2259 | 945 |
!HierarchicalFileList::Directory methodsFor:'fetching'! |
946 |
||
947 |
basicFetchIndicator |
|
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
948 |
|linkName fileName hasChildren info| |
2267 | 949 |
|
2583 | 950 |
fileName := self fileName. |
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
951 |
info := fileName linkInfo. |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
952 |
(info notNil and:[info isSymbolicLink]) ifTrue:[ |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
953 |
linkName := info path. |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
954 |
] ifFalse:[ |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
955 |
linkName := fileName name. |
2583 | 956 |
]. |
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
957 |
|
2583 | 958 |
(OperatingSystem mountPoints contains:[:mp | mp mountPointPath = linkName]) ifTrue:[ |
959 |
"do not follow mounted directories automatically (could be an NFS hardlink)" |
|
960 |
^ self. |
|
961 |
]. |
|
962 |
||
963 |
hasChildren := DirectoryContents directoryNamed:fileName detect:(self model matchBlock). |
|
2475 | 964 |
self knownToHaveChildren:hasChildren. |
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
965 |
self assert:children isNil. |
2475 | 966 |
|
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
967 |
(children isNil and:[info notNil]) ifTrue:[ |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
968 |
"setup modification time to suppress monitorCycle" |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
969 |
modificationTime := info modificationTime. |
2267 | 970 |
]. |
2259 | 971 |
! |
972 |
||
973 |
fetchIndicator |
|
2475 | 974 |
"fetch the indicator value which indicates whether children exist or not. |
975 |
Called by the lists update process. |
|
2259 | 976 |
" |
2306 | 977 |
children notNil ifTrue:[ |
2259 | 978 |
"/ children already read |
2475 | 979 |
self forgetAboutChildren. |
980 |
^ self |
|
2259 | 981 |
]. |
982 |
||
2475 | 983 |
self isFetchingChildrenInfo ifFalse:[ |
984 |
"/ children will be updated in a second.... |
|
2259 | 985 |
^ self |
986 |
]. |
|
987 |
"/ suppress restart of fetchIndicator |
|
988 |
||
989 |
self basicFetchIndicator. |
|
990 |
||
2475 | 991 |
children notNil ifTrue:[self halt]. |
992 |
||
2259 | 993 |
children notNil ifTrue:[ |
2475 | 994 |
self forgetAboutChildren. |
2259 | 995 |
children notEmpty ifTrue:[ self changed:#redraw ]. |
996 |
] ifFalse:[ |
|
997 |
"/ is a remote or very slow file system |
|
2475 | 998 |
self isKnownToHaveChildren ifTrue:[ |
2267 | 999 |
self changed:#redraw |
1000 |
]. |
|
2259 | 1001 |
]. |
1002 |
! |
|
1003 |
||
1004 |
resetFetchIndicator |
|
1005 |
"update indication cycle has deregistered the item |
|
1006 |
" |
|
2475 | 1007 |
|
1008 |
self forgetAboutChildren. |
|
1009 |
! ! |
|
1010 |
||
1011 |
!HierarchicalFileList::Directory methodsFor:'private'! |
|
1012 |
||
1013 |
flushChildren |
|
1014 |
"flush the children because the node is going to be invisible. |
|
1015 |
" |
|
1016 |
children notNil ifTrue:[ |
|
1017 |
self knownToHaveChildren:(children size ~~ 0). |
|
1018 |
children := nil. |
|
1019 |
]. |
|
1020 |
! ! |
|
1021 |
||
2493 | 1022 |
!HierarchicalFileList::Directory methodsFor:'private-quick children info'! |
2475 | 1023 |
|
1024 |
forgetAboutChildren |
|
1025 |
quickChildrenInfo := StateUnknown |
|
1026 |
! |
|
1027 |
||
1028 |
isChildrenInfoValid |
|
1029 |
^ quickChildrenInfo ~~ StateUnknown and:[quickChildrenInfo ~~ StateFetching] |
|
1030 |
! |
|
1031 |
||
1032 |
isFetchingChildrenInfo |
|
1033 |
^ quickChildrenInfo == StateFetching |
|
1034 |
! |
|
1035 |
||
1036 |
isKnownToHaveChildren |
|
1037 |
^ quickChildrenInfo == StateHasChildren |
|
1038 |
! |
|
1039 |
||
1040 |
isKnownToHaveNoChildren |
|
1041 |
^ quickChildrenInfo == StateHasNoChildren |
|
1042 |
! |
|
1043 |
||
1044 |
knownToHaveChildren:aBoolean |
|
1045 |
aBoolean ifTrue:[ |
|
1046 |
quickChildrenInfo := StateHasChildren. |
|
1047 |
] ifFalse:[ |
|
1048 |
quickChildrenInfo := StateHasNoChildren. |
|
1049 |
]. |
|
1050 |
! |
|
1051 |
||
1052 |
setFetchingChildrenInfo |
|
1053 |
quickChildrenInfo := StateFetching |
|
2259 | 1054 |
! ! |
1055 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1056 |
!HierarchicalFileList::Directory methodsFor:'queries'! |
1390 | 1057 |
|
2475 | 1058 |
canExpand |
1059 |
super canExpand ifTrue:[^ true]. |
|
1060 |
"/ in case we are fetching the subdirectory |
|
1061 |
self isFetchingChildrenInfo ifTrue:[ |
|
2525 | 1062 |
"/self halt. |
2475 | 1063 |
]. |
1064 |
||
1065 |
^ false |
|
1066 |
! |
|
1067 |
||
1390 | 1068 |
hasChildren |
2475 | 1069 |
"returns true if children exist |
1390 | 1070 |
" |
2259 | 1071 |
|model| |
1072 |
||
1073 |
children notNil ifTrue:[ |
|
2475 | 1074 |
self forgetAboutChildren. |
1075 |
^ children size ~~ 0 |
|
2259 | 1076 |
]. |
1077 |
||
2475 | 1078 |
self isFetchingChildrenInfo ifTrue:[ |
1079 |
^ false. |
|
1080 |
]. |
|
1081 |
self isChildrenInfoValid ifTrue:[ |
|
1082 |
^ self isKnownToHaveChildren |
|
2259 | 1083 |
]. |
1084 |
||
1085 |
model := self model. |
|
1086 |
||
1087 |
model notNil ifTrue:[ |
|
2475 | 1088 |
self setFetchingChildrenInfo. |
2259 | 1089 |
model startIndicatorValidationFor:self. |
1090 |
] ifFalse:[ |
|
2267 | 1091 |
self error:'should not happen' mayProceed:true. |
2475 | 1092 |
self forgetAboutChildren |
2259 | 1093 |
]. |
2475 | 1094 |
children size ~~ 0 ifTrue:[self halt. ^ true]. |
1095 |
^ false |
|
1390 | 1096 |
! |
1097 |
||
1098 |
isDirectory |
|
1099 |
"always returns true |
|
1100 |
" |
|
1101 |
^ true |
|
1102 |
||
1103 |
||
1104 |
! ! |
|
1105 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1106 |
!HierarchicalFileList::Directory methodsFor:'validation'! |
1390 | 1107 |
|
2267 | 1108 |
invalidateRepairNow:doRepair |
1109 |
"invalidate contents |
|
1110 |
" |
|
2475 | 1111 |
modificationTime := nil. |
1112 |
self forgetAboutChildren |
|
2267 | 1113 |
|
1114 |
isExpanded ifFalse:[ |
|
1115 |
children := nil |
|
1116 |
] ifTrue:[ |
|
1117 |
doRepair ifTrue:[ |
|
1118 |
self monitoringCycle |
|
1119 |
] ifFalse:[ |
|
1120 |
children size == 0 ifTrue:[ |
|
1121 |
"/ expanded but no children added, thus can reset the children |
|
1122 |
children := nil |
|
1123 |
] |
|
1124 |
] |
|
1125 |
]. |
|
1126 |
! |
|
1127 |
||
1128 |
matchBlockChanged |
|
1129 |
"called if the matchBlock changed |
|
1130 |
" |
|
1131 |
modificationTime := nil. |
|
1132 |
||
1133 |
isExpanded ifFalse:[ |
|
2475 | 1134 |
children := nil. |
1135 |
self forgetAboutChildren |
|
2267 | 1136 |
] ifTrue:[ |
1137 |
self monitoringCycle. |
|
1138 |
||
1139 |
children size ~~ 0 ifTrue:[ |
|
1140 |
children do:[:aChild| aChild matchBlockChanged ] |
|
1141 |
] |
|
1142 |
]. |
|
1143 |
! |
|
1144 |
||
1145 |
monitoringCycle |
|
1146 |
"run monitoring cycle |
|
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1147 |
!!!!!!!! called by the HierarchicalList only !!!!!!!!" |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1148 |
|
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1149 |
|fileName unusedDict addedItems mergedList size modifyTime model timeChanged info| |
2267 | 1150 |
|
2583 | 1151 |
fileName := self fileName. |
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1152 |
info := fileName linkInfo. |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1153 |
info isNil ifTrue:[^ self]. |
2267 | 1154 |
|
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1155 |
modifyTime := info modificationTime. |
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1156 |
timeChanged := modifyTime ~= modificationTime. |
2267 | 1157 |
modificationTime := modifyTime. |
1158 |
||
2306 | 1159 |
children notNil ifTrue:[ |
2267 | 1160 |
timeChanged ifFalse:[ |
1161 |
^ self |
|
1162 |
]. |
|
1163 |
]. |
|
2475 | 1164 |
|
2583 | 1165 |
DirectoryContents flushCachedDirectoryFor:fileName. |
2267 | 1166 |
isExpanded ifFalse:[ |
1167 |
timeChanged ifTrue:[ |
|
2475 | 1168 |
children := nil. |
1169 |
self forgetAboutChildren. |
|
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1170 |
self changed:#redraw. |
2267 | 1171 |
]. |
1172 |
^ self |
|
1173 |
]. |
|
2475 | 1174 |
|
2306 | 1175 |
children isNil ifTrue:[ children := #() ]. "/ disable update during merge |
2267 | 1176 |
|
2475 | 1177 |
self forgetAboutChildren. |
1178 |
model := self model. |
|
1179 |
mergedList := model childrenFor:self. |
|
2267 | 1180 |
|
1181 |
mergedList size == 0 ifTrue:[ |
|
1182 |
self removeAll. |
|
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1183 |
^ self |
2267 | 1184 |
]. |
1185 |
||
1186 |
size := children size. |
|
1187 |
size == 0 ifTrue:[ |
|
1188 |
self addAll:mergedList. |
|
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1189 |
^ self |
2267 | 1190 |
]. |
1191 |
||
1192 |
model criticalDo:[ |
|
1193 |
addedItems := OrderedCollection new:128. |
|
1194 |
unusedDict := Dictionary new:size. |
|
1195 |
||
1196 |
children do:[:el| unusedDict at:(el fileName) put:el ]. |
|
1197 |
||
1198 |
mergedList keysAndValuesDo:[:anIndex :anItem| |item| |
|
1199 |
item := unusedDict removeKey:(anItem fileName) ifAbsent:nil. |
|
1200 |
||
1201 |
item notNil ifTrue:[ |
|
1202 |
mergedList at:anIndex put:item |
|
1203 |
] ifFalse:[ |
|
1204 |
addedItems add:anItem. |
|
1205 |
anItem parent:self. |
|
1206 |
]. |
|
1207 |
]. |
|
1208 |
"/ 12 is hardcoded !!!!!!!! |
|
1209 |
||
1210 |
(unusedDict size + addedItems size) > 12 ifTrue:[ |
|
1211 |
"/ generate two nofifications: collapse and expand |
|
1212 |
self collapse. |
|
1213 |
children := mergedList. |
|
1214 |
self expand. |
|
1215 |
] ifFalse:[ |
|
1216 |
unusedDict do:[:el| self remove:el ]. |
|
1217 |
||
1218 |
addedItems notEmpty ifTrue:[ |
|
1219 |
self addAll:addedItems |
|
1220 |
]. |
|
1221 |
"/ children order changed test |
|
1222 |
children := mergedList. |
|
1223 |
self childrenOrderChanged. |
|
1224 |
]. |
|
1225 |
]. |
|
2425
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1226 |
! |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1227 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1228 |
updateList |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1229 |
|
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1230 |
modificationTime := nil. |
7421b8bb7d31
reset modificationtime for updates to get the new files on remote systems where times are different
penk
parents:
2388
diff
changeset
|
1231 |
self monitoringCycle. |
1390 | 1232 |
! ! |
1233 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1234 |
!HierarchicalFileList::RemoteDirectory methodsFor:'queries'! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1235 |
|
2267 | 1236 |
hasChildren |
1237 |
"returns true if children exists |
|
1238 |
" |
|
1239 |
children notNil ifTrue:[ |
|
2475 | 1240 |
self forgetAboutChildren. |
2267 | 1241 |
^ children size ~~ 0 |
1242 |
]. |
|
2475 | 1243 |
|
1244 |
"/ assume that there are children; |
|
1245 |
"/ this might be wrong and clicking on the expand-icon |
|
1246 |
"/ will then not perform an expand, but remove the can-expand indicator. |
|
1247 |
self knownToHaveChildren:true. |
|
1248 |
^ true |
|
2267 | 1249 |
! |
1250 |
||
2223
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1251 |
isRemoteDirectory |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1252 |
^ true |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1253 |
! ! |
c34e7fd25e53
monitoring; delayed for directories; never for remoteDirectories
penk
parents:
2180
diff
changeset
|
1254 |
|
1390 | 1255 |
!HierarchicalFileList class methodsFor:'documentation'! |
1256 |
||
1257 |
version |
|
2734
4934113dc4c0
#linkInfo now returns the info also for files that are not a symlink
Stefan Vogel <sv@exept.de>
parents:
2654
diff
changeset
|
1258 |
^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalFileList.st,v 1.52 2004-08-13 19:30:55 stefan Exp $' |
1390 | 1259 |
! ! |
2475 | 1260 |
|
1261 |
HierarchicalFileList::Directory initialize! |