realbasic-nug
[Top] [All Lists]

Re: Total file count?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Total file count?
From: Phil Mobley <phil at mobleybros dot com>
Date: Fri, 31 Dec 2004 12:10:39 -0800
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <772953130412311156689e8dea at mail dot gmail dot com>
On Dec 31, 2004, at 11:56 AM, Dave wrote:

Is there a way i can quickly find out the COMPLETE number of items in a folder? The MBS has a VolumeInformationMBS class with FileCount and FolderCount properties, but I'd like to be able to get this information for individual folders.

I realize I could write a recursive loop, checking for Folderitem.Directory and all that, but I think that will be too slow. I need this to be as fast as possible.

That would not be too slow.

You would need to touch every FolderItem.TrueItem() to see if it is a folder or not. But that shouldn't take too long.

But you need to decide how you are going to treat bundled items, are they a single file or are they a folder with multiple items? Currently "Directory" will return True for bundles. If you need to exclude the contents of bundles, then search the archives for the "IsBundle" routine.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>