Update ooo320-m1
[ooovba.git] / tools / source / fsys / tdir.cxx
blob22a953bcca69e96268e0d10bb19bcdea0c6d8dee
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tdir.cxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_tools.hxx"
34 #define _DIR_CXX
36 #include <stdlib.h>
37 #include <cstdarg>
38 #include <limits.h>
39 #include <tools/debug.hxx>
40 #include <tools/list.hxx>
42 #ifndef _COMPED_HXX
43 #include "comdep.hxx"
44 #endif
45 #include <tools/fsys.hxx>
48 DBG_NAME( Dir )
50 DECLARE_LIST( DirEntryList, DirEntry* )
51 DECLARE_LIST( FSysSortList, FSysSort* )
52 DECLARE_LIST( FileStatList, FileStat* )
54 #define APPEND (USHORT) 65535
56 /*************************************************************************
58 |* Dir::InsertPointReached()
60 |* Beschreibung stellt fest, ob eingefuegt werden musz
61 |* Ersterstellung MA 05.11.91
62 |* Letzte Aenderung MI 05.02.92
64 *************************************************************************/
66 BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
67 const FileStat& rNewStat,
68 ULONG nCurPos, ULONG nSortIndex ) const
70 #define VALUE( nKindFlags ) \
71 ( ( FSYS_KIND_FILE | FSYS_KIND_DIR | FSYS_KIND_DEV | \
72 FSYS_KIND_CHAR | FSYS_KIND_BLOCK ) & nKindFlags )
74 // einfache Dinge erfordern einfache Loesungen
75 if ( !pLst->Count() )
76 return TRUE;
78 FSysSort nSort = *( pSortLst->GetObject( nSortIndex ) );
79 FileStat *pOldStat = NULL;
80 DirEntry *pCurLstObj = pLst->GetObject( nCurPos );
81 if ( pStatLst )
82 pOldStat = pStatLst->GetObject( nCurPos );
84 switch( nSort )
86 case FSYS_SORT_NAME:
87 case (FSYS_SORT_NAME | FSYS_SORT_ASCENDING):
88 if ( pCurLstObj->aName > rNewEntry.aName )
89 return TRUE;
90 if ( !(pCurLstObj->aName == rNewEntry.aName) )
91 return FALSE;
92 break;
93 case (FSYS_SORT_NAME | FSYS_SORT_DESCENDING):
94 if ( pCurLstObj->aName < rNewEntry.aName )
95 return TRUE;
96 if ( !(pCurLstObj->aName == rNewEntry.aName) )
97 return FALSE;
98 break;
100 case FSYS_SORT_EXT:
101 case (FSYS_SORT_EXT | FSYS_SORT_ASCENDING):
103 if ( pCurLstObj->GetExtension() > rNewEntry.GetExtension() )
104 return TRUE;
105 if ( !(pCurLstObj->GetExtension() == rNewEntry.GetExtension()) )
106 return FALSE;
107 break;
109 case (FSYS_SORT_EXT | FSYS_SORT_DESCENDING):
111 if ( pCurLstObj->GetExtension() < rNewEntry.GetExtension() )
112 return TRUE;
113 if ( !(pCurLstObj->GetExtension() == rNewEntry.GetExtension()) )
114 return FALSE;
115 break;
118 case FSYS_SORT_KIND:
119 case (FSYS_SORT_KIND | FSYS_SORT_ASCENDING ):
120 if ( VALUE(pOldStat->nKindFlags) > VALUE(rNewStat.nKindFlags) )
121 return TRUE;
122 if ( !(VALUE(pOldStat->nKindFlags) == VALUE(rNewStat.nKindFlags)) )
123 return FALSE;
124 break;
125 case (FSYS_SORT_KIND | FSYS_SORT_DESCENDING):
126 if ( VALUE(pOldStat->nKindFlags) < VALUE(rNewStat.nKindFlags) )
127 return TRUE;
128 if ( !(VALUE(pOldStat->nKindFlags) == VALUE(rNewStat.nKindFlags)) )
129 return FALSE;
130 break;
132 case FSYS_SORT_SIZE:
133 case (FSYS_SORT_SIZE | FSYS_SORT_ASCENDING):
134 if ( pOldStat->nSize > rNewStat.nSize )
135 return TRUE;
136 if ( !(pOldStat->nSize == rNewStat.nSize) )
137 return FALSE;
138 break;
139 case (FSYS_SORT_SIZE | FSYS_SORT_DESCENDING):
140 if ( pOldStat->nSize < rNewStat.nSize )
141 return TRUE;
142 if ( !(pOldStat->nSize == rNewStat.nSize) )
143 return FALSE;
144 break;
146 case FSYS_SORT_MODIFYED:
147 case (FSYS_SORT_MODIFYED | FSYS_SORT_ASCENDING):
148 if ( (pOldStat->aDateModified >= rNewStat.aDateModified) &&
149 (pOldStat->aTimeModified > rNewStat.aTimeModified) )
150 return TRUE;
151 if ( !((pOldStat->aDateModified == rNewStat.aDateModified) &&
152 (pOldStat->aTimeModified == rNewStat.aTimeModified)) )
153 return FALSE;
154 break;
155 case (FSYS_SORT_MODIFYED | FSYS_SORT_DESCENDING):
156 if ( (pOldStat->aDateModified <= rNewStat.aDateModified) &&
157 (pOldStat->aTimeModified < rNewStat.aTimeModified) )
158 return TRUE;
159 if ( !((pOldStat->aDateModified == rNewStat.aDateModified) &&
160 (pOldStat->aTimeModified == rNewStat.aTimeModified)) )
161 return FALSE;
162 break;
164 case FSYS_SORT_CREATED:
165 case (FSYS_SORT_CREATED | FSYS_SORT_ASCENDING):
166 if ( (pOldStat->aDateCreated >= rNewStat.aDateCreated) &&
167 (pOldStat->aTimeCreated > rNewStat.aTimeCreated) )
168 return TRUE;
169 if ( !((pOldStat->aDateCreated == rNewStat.aDateCreated) &&
170 (pOldStat->aTimeCreated == rNewStat.aTimeCreated)) )
171 return FALSE;
172 break;
173 case (FSYS_SORT_CREATED | FSYS_SORT_DESCENDING):
174 if ( (pOldStat->aDateCreated <= rNewStat.aDateCreated) &&
175 (pOldStat->aTimeCreated < rNewStat.aTimeCreated) )
176 return TRUE;
177 if ( !((pOldStat->aDateCreated == rNewStat.aDateCreated) &&
178 (pOldStat->aTimeCreated == rNewStat.aTimeCreated)) )
179 return FALSE;
180 break;
182 case FSYS_SORT_ACCESSED:
183 case (FSYS_SORT_ACCESSED | FSYS_SORT_ASCENDING):
184 if ( (pOldStat->aDateAccessed >= rNewStat.aDateAccessed) &&
185 (pOldStat->aTimeAccessed > rNewStat.aTimeAccessed) )
186 return TRUE;
187 if ( !((pOldStat->aDateAccessed == rNewStat.aDateAccessed) &&
188 (pOldStat->aTimeAccessed == rNewStat.aTimeAccessed)) )
189 return FALSE;
190 break;
191 case (FSYS_SORT_ACCESSED | FSYS_SORT_DESCENDING):
192 if ( (pOldStat->aDateAccessed <= rNewStat.aDateAccessed) &&
193 (pOldStat->aTimeAccessed < rNewStat.aTimeAccessed) )
194 return TRUE;
195 if ( !((pOldStat->aDateAccessed == rNewStat.aDateAccessed) &&
196 (pOldStat->aTimeAccessed == rNewStat.aTimeAccessed)) )
197 return FALSE;
198 break;
199 default: /* Kann nicht sein */;
202 if ( nSortIndex == ( pSortLst->Count() - 1 ) )
203 return TRUE;
204 else
205 //Rekursion
206 return ImpInsertPointReached( rNewEntry, rNewStat,
207 nCurPos, nSortIndex + 1 );
208 #undef VALUE
211 /*************************************************************************
213 |* Dir::ImpSortedInsert()
215 |* Beschreibung fuegt sortiert ein
216 |* Ersterstellung MA 05.11.91
217 |* Letzte Aenderung MA 03.12.91
219 *************************************************************************/
221 void Dir::ImpSortedInsert( const DirEntry *pNewEntry, const FileStat *pNewStat )
223 //Sonderfall, keine Sortierung gewuenscht.
224 if ( !pSortLst ) {
225 pLst->Insert( (DirEntry*)pNewEntry, APPEND );
226 return;
229 pLst->First();
230 do {
231 if ( ImpInsertPointReached( *pNewEntry, *pNewStat, pLst->GetCurPos(),
232 (ULONG)0 ) )
234 if ( pStatLst )
235 pStatLst->Insert( (FileStat*)pNewStat, pLst->GetCurPos() );
236 pLst->Insert( (DirEntry*)pNewEntry );
237 return;
239 } while( pLst->Next() );
241 if ( pStatLst )
242 pStatLst->Insert( (FileStat*)pNewStat, APPEND );
243 pLst->Insert( (DirEntry*)pNewEntry, APPEND );
246 /*************************************************************************
248 |* Dir::Construct()
250 |* Beschreibung gemeinsame Implementation der Ctoren
251 |* Ersterstellung MI 02.06.93
252 |* Letzte Aenderung MI 02.06.93
254 *************************************************************************/
256 void Dir::Construct( DirEntryKind nKindFlags )
258 pLst = NULL;
259 pSortLst = NULL;
260 pStatLst = NULL;
261 eAttrMask = nKindFlags;
262 ByteString aTempName( GetName(), osl_getThreadTextEncoding() );
263 if ( aTempName.Search( "*" ) != STRING_NOTFOUND ||
264 aTempName.Search( "?" ) != STRING_NOTFOUND )
265 #if defined( WNT ) && !defined( WTC )
267 ByteString aTStr(CutName(), osl_getThreadTextEncoding());
268 char* pBuffer = new char[aTStr.Len()+1];
269 strcpy( pBuffer, aTStr.GetBuffer() );
270 CharLowerBuff( pBuffer, aTStr.Len() );
271 aNameMask = WildCard( String(pBuffer, osl_getThreadTextEncoding()), ';' );
272 delete pBuffer;
274 #else
275 aNameMask = WildCard( CutName(), ';' );
276 #endif
277 else
278 aNameMask = String("*", osl_getThreadTextEncoding());
281 /*************************************************************************
283 |* Dir::Update()
285 |* Beschreibung FSYS.SDW
286 |* Ersterstellung MI 16.05.91
287 |* Letzte Aenderung MI 19.09.96
289 *************************************************************************/
291 BOOL Dir::Update()
293 Reset();
294 return Scan( USHRT_MAX ) > 0;
297 /*************************************************************************
299 |* Dir::Reset()
301 |* Beschreibung
302 |* Ersterstellung MI 22.10.96
303 |* Letzte Aenderung MI 22.10.96
305 *************************************************************************/
307 void Dir::Reset()
309 // ggf. alten Reader l"oschen
310 if ( pReader && pReader->bInUse )
311 DELETEZ(pReader);
313 // alle DirEntries aus der Liste entfernen und deren Speicher freigeben
314 if ( pLst )
316 DirEntry* pEntry = pLst->First();
317 while (pEntry)
319 DirEntry* pNext = pLst->Next();
320 delete pEntry;
321 pEntry = pNext;
323 pLst->Clear();
325 else
326 pLst = new DirEntryList();
328 // Alte File-Stat's Loeschen
329 if ( pStatLst )
331 //Erstmal die alten Loeschen
332 FileStat* pEntry = pStatLst->First();
333 while (pEntry)
335 FileStat* pNext = pStatLst->Next();
336 delete pEntry;
337 pEntry = pNext;
339 pStatLst->Clear();
340 delete pStatLst;
343 // Verlangen die Sortierkriterien FileStat's?
344 if ( pSortLst )
346 pSortLst->First();
349 if ( *( pSortLst->GetCurObject() ) &
350 ( FSYS_SORT_KIND | FSYS_SORT_SIZE |
351 FSYS_SORT_CREATED | FSYS_SORT_MODIFYED | FSYS_SORT_ACCESSED ) )
352 pStatLst = new FileStatList();
353 } while ( !pStatLst && pSortLst->Next() );
356 #ifndef BOOTSTRAP
357 // ggf. einen neuen Reader aufsetzen
358 if ( !pReader )
359 pReader = new DirReader_Impl( *this );
360 #endif
362 // gibt es das zu oeffnende Verzeichnis ueberhaupt?
363 #if !defined(UNX) && !defined(OS2) //explanation: see DirReader_Impl::Read() in unx.cxx
364 if( !pReader->pDosDir )
366 nError = FSYS_ERR_NOTADIRECTORY;
367 DELETEZ( pReader );
368 return;
370 #endif
373 /*************************************************************************
375 |* Dir::Scan()
377 |* Beschreibung FSYS.SDW
378 |* Ersterstellung MI 18.09.96
379 |* Letzte Aenderung MI 19.09.96
381 *************************************************************************/
383 USHORT Dir::Scan( USHORT nCount )
386 USHORT nRead = 0; // Anzahl in dieser Runde gelesener Eintr"age
387 FSysFailOnErrorImpl();
389 // noch nicht fertig gewesen
390 if ( pReader )
392 // frischer Reader?
393 if ( !pLst->Count() )
395 // dann ggf. Laufwerke scannen
396 pReader->bInUse = TRUE;
397 nRead = pReader->Init();
400 // weiterlesen...
401 while ( nRead <= nCount && !pReader->bReady )
402 nRead = nRead + pReader->Read();
404 // fertig?
405 if ( pReader && pReader->bReady )
406 DELETEZ( pReader );
409 // Anzahl der gelesenen zur"uckgeben
410 return nRead;
413 /*************************************************************************
415 |* Dir::Dir()
417 |* Beschreibung FSYS.SDW
418 |* Ersterstellung MI 16.05.91
419 |* Letzte Aenderung MI 04.03.92
421 *************************************************************************/
423 Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags, FSysSort nSort, ... ):
424 DirEntry( rDirEntry ),
425 pReader( 0 )
427 DBG_CTOR( Dir, NULL );
429 Construct( nKindFlags );
431 std::va_list pArgs;
432 va_start( pArgs, nSort );
433 ImpSetSort( pArgs, nSort );
435 Reset();
438 /*************************************************************************
440 |* Dir::Dir()
442 |* Beschreibung FSYS.SDW
443 |* Ersterstellung MI 02.06.93
444 |* Letzte Aenderung MI 02.06.93
446 *************************************************************************/
448 Dir::Dir( const DirEntry& rDirEntry, DirEntryKind nKindFlags ):
449 DirEntry( rDirEntry ),
450 pReader( 0 )
452 DBG_CTOR( Dir, NULL );
454 Construct( nKindFlags );
455 Reset();
458 /*************************************************************************
460 |* Dir::Dir()
462 |* Beschreibung FSYS.SDW
463 |* Ersterstellung MI 16.05.91
464 |* Letzte Aenderung MA 04.11.91
466 *************************************************************************/
468 Dir::Dir():
469 pReader( 0 )
471 DBG_CTOR( Dir, NULL );
473 pLst = NULL;
474 pSortLst = NULL;
475 pStatLst = NULL;
476 eAttrMask = FSYS_KIND_ALL;
477 aNameMask = String("*", osl_getThreadTextEncoding());
480 /*************************************************************************
482 |* Dir::~Dir()
484 |* Beschreibung FSYS.SDW
485 |* Ersterstellung MI 16.05.91
486 |* Letzte Aenderung MA 04.11.91
488 *************************************************************************/
490 Dir::~Dir()
492 DBG_DTOR( Dir, NULL );
494 // alle DirEntries aus der Liste entfernen und deren Speicher freigeben
495 if ( pLst )
497 DirEntry* pEntry = pLst->First();
498 while (pEntry)
500 DirEntry* pNext = pLst->Next();
501 delete pEntry;
502 pEntry = pNext;
504 pLst->Clear();
506 delete pLst;
509 // alle Sorts aus der Liste entfernen und deren Speicher freigeben
510 if ( pSortLst )
512 FSysSort* pEntry = pSortLst->First();
513 while (pEntry)
515 FSysSort* pNext = pSortLst->Next();
516 delete pEntry;
517 pEntry = pNext;
519 pSortLst->Clear();
521 delete pSortLst;
524 // alle FileStat's aus der Liste entfernen und deren Speicher freigeben
525 if ( pStatLst )
527 FileStat* pEntry = pStatLst->First();
528 while (pEntry)
530 FileStat* pNext = pStatLst->Next();
531 delete pEntry;
532 pEntry = pNext;
534 pStatLst->Clear();
535 delete pStatLst;
538 // ggf. laufenden Reader freigeben
539 delete pReader;
542 /*************************************************************************
544 |* Dir::ImpSetSort()
546 |* Beschreibung FSYS.SDW
547 |* Ersterstellung MA 04.11.91
548 |* Letzte Aenderung MI 05.02.92
550 *************************************************************************/
552 FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
554 BOOL bLast;
555 FSysSort *pSort;
556 FSysSortList *pNewSortLst = new FSysSortList;
558 *( pSort = new FSysSort ) = nFirstSort;
561 // letztes Kriterium?
562 bLast = FSYS_SORT_END == (*pSort & FSYS_SORT_END);
563 *pSort &= ~FSYS_SORT_END;
565 FSysSort nSort = *pSort & ~(USHORT)FSYS_SORT_ASCENDING
566 & ~(USHORT)FSYS_SORT_DESCENDING;
568 // g"utliges Sortierkriterium?
569 if ( ( nSort == FSYS_SORT_NAME ) ||
570 ( nSort == FSYS_SORT_SIZE ) ||
571 ( nSort == FSYS_SORT_EXT ) ||
572 ( nSort == FSYS_SORT_CREATED ) ||
573 ( nSort == FSYS_SORT_MODIFYED ) ||
574 ( nSort == FSYS_SORT_ACCESSED ) ||
575 ( nSort == FSYS_SORT_KIND ) )
577 pNewSortLst->Insert( pSort, APPEND );
578 *(pSort = new FSysSort) = va_arg( pArgs, FSysSort );
580 else
581 { // ungueltiger Sort oder FSYS_SORT_NONE
582 FSysSort* pEntry = pNewSortLst->First();
583 while (pEntry)
585 FSysSort* pNext = pNewSortLst->Next();
586 delete pEntry;
587 pEntry = pNext;
589 pNewSortLst->Clear();
590 delete pNewSortLst;
591 if ( *pSort == FSYS_SORT_NONE )
593 delete pSort;
594 if ( pSortLst )
595 delete pSortLst;
596 return FSYS_ERR_OK;
598 else
600 delete pSort;
601 return FSYS_ERR_NOTSUPPORTED;
604 } while ( !bLast );
606 va_end( pArgs );
607 delete pSort; // JP:6.3.00 - delete the initial pointer
609 //Enfernen der alten Sort-Elemente
610 if ( pSortLst )
612 FSysSort* pEntry = pSortLst->First();
613 while (pEntry)
615 FSysSort* pNext = pSortLst->Next();
616 delete pEntry;
617 pEntry = pNext;
619 pSortLst->Clear();
620 delete pSortLst;
622 pSortLst = pNewSortLst;
624 //Jetzt noch neu Sortieren...
626 //Wenn keine FileStats da sind, aber nun welche gebraucht werden,
627 //ist der Aufruf von Update() die einfachste Moeglichkeit
628 if ( !pStatLst && pSortLst )
630 pSortLst->First();
633 if ( *(pSortLst->GetCurObject()) &
634 ( FSYS_SORT_CREATED | FSYS_SORT_MODIFYED | FSYS_SORT_SIZE |
635 FSYS_SORT_ACCESSED | FSYS_SORT_KIND ) )
637 Update();
638 return FSYS_ERR_OK;
640 } while ( !pStatLst && pSortLst->Next() );
643 if ( pLst ) { //Keine DirEntry's, kein Sort.
644 DirEntryList *pOldLst = pLst; //alte Liste merken
645 pLst = new DirEntryList(); //neue Liste (zu Sortieren)
647 FileStatList *pOldStatLst = NULL; //alte StatListe merken
648 if ( pStatLst ) {
649 pOldStatLst = pStatLst;
650 pStatLst = new FileStatList(); //neue StatListe (zu Sortieren)
652 pOldLst->First();
655 //Sortiertes Einfuegen der Elemente aus den gemerkten Listen
656 //in die 'richtigen' Listen
657 if ( pOldStatLst )
658 ImpSortedInsert( pOldLst->GetCurObject(),
659 pOldStatLst->GetObject( pOldLst->GetCurPos() ) );
660 else
661 ImpSortedInsert( pOldLst->GetCurObject(), NULL );
662 } while( pOldLst->Next() );
664 delete pOldLst;
665 if ( pOldStatLst )
666 delete pOldStatLst;
668 return FSYS_ERR_OK;
671 /*************************************************************************
673 |* Dir::SetSort()
675 |* Beschreibung FSYS.SDW
676 |* Ersterstellung MA 04.11.91
677 |* Letzte Aenderung MI 05.02.92
679 *************************************************************************/
681 FSysError Dir::SetSort( FSysSort nSort, ... )
683 std::va_list pArgs;
684 va_start( pArgs, nSort );
685 return ImpSetSort( pArgs, nSort );
688 /*************************************************************************
690 |* Dir::operator[]()
692 |* Beschreibung FSYS.SDW
693 |* Ersterstellung MI 16.05.91
694 |* Letzte Aenderung MI 16.05.91
696 *************************************************************************/
698 DirEntry& Dir::operator[] ( USHORT nIndex ) const
700 DBG_ASSERT( nIndex < Count(), "Dir::operator[] : nIndex > Count()" );
702 DirEntry *pEntry = pLst->GetObject( nIndex );
703 return *pEntry;
706 /*************************************************************************
708 |* Dir::operator+= ()
710 |* Beschreibung FSYS.SDW
711 |* Ersterstellung MI 16.05.91
712 |* Letzte Aenderung MI 16.05.91
714 *************************************************************************/
716 Dir& Dir::operator+=( const Dir& rDir )
718 // ggf. erst den Rest lesen
719 if ( pReader )
720 Scan( USHRT_MAX );
721 DBG_ASSERT( !rDir.pReader, "Dir::+= with incomplete Dir" );
723 // ggf. initiale Liste erzeugen
724 if ( !pLst )
725 pLst = new DirEntryList();
727 //Verlangen die Sortierkriterien FileStat's?
728 BOOL bStat = FALSE;
729 if ( pSortLst ) {
730 pSortLst->First();
731 do {
732 if ( *(pSortLst->GetCurObject()) &
733 ( FSYS_SORT_CREATED | FSYS_SORT_MODIFYED | FSYS_SORT_SIZE |
734 FSYS_SORT_ACCESSED | FSYS_SORT_KIND ) )
735 bStat = TRUE;
736 } while ( !bStat && pSortLst->Next() );
738 FileStat * stat = NULL;
739 for ( USHORT nNr = 0; nNr < rDir.Count(); nNr++ )
741 if ( bStat )
743 if ( rDir.pStatLst )
744 stat = new FileStat( *rDir.pStatLst->GetObject(nNr) );
745 else
746 stat = new FileStat( rDir[nNr] );
748 ImpSortedInsert( new DirEntry( rDir[nNr] ), stat );
750 return *this;
753 /*************************************************************************
755 |* Dir::Count()
757 |* Beschreibung FSYS.SDW
758 |* Ersterstellung MI 16.05.91
759 |* Letzte Aenderung MI 18.09.96
761 *************************************************************************/
764 USHORT Dir::Count( BOOL bUpdated ) const
766 // ggf. erst den Rest lesen
767 if ( bUpdated && pReader )
768 ((Dir*)this)->Scan( USHRT_MAX );
770 return pLst == NULL ? 0 : (USHORT) pLst->Count();