Re: Obtain directory size.
Re: Obtain directory size.
- Subject: Re: Obtain directory size.
- From: Rosyna <email@hidden>
- Date: Fri, 20 May 2005 16:26:09 -0700
Title: Re: Obtain directory size.
Usually not a problem. Although I would suggest using a number
closer to the page size. I believe that is about 40 items or so per
iteration. Some version of OS X (10.1? 10.2 and lower?) has a bug
where anything over 42 or something would cause horribly bad results.
I can't remember the exact number.
FSRefs are 80bytes according to Files.h
But I highly recommend calculating it based on the page size, or
using 40 or so. It's also much faster. Yeah, I sadly did a bunch of
Calculations on the speed of the different enumeration calls a long
time back.
Ack, at 5/20/05, Daniel Jalkut said:
Looking more carefully at my own code, I
would probably suggest changing this so that the allocations for the
fetchedRefs and fetchedInfos are made outside of the
recursion.
I'm now afraid that this could easily
exhaust the stack if a folder is sufficiently deep. FSRefs and
FSCatalogInfos aren't small!
Daniel
On May 20, 2005, at 9:42 AM, Daniel
Jalkut wrote:
const
ItemCount kMaxEntriesPerFetch = 256;
ItemCount
actualFetched;
FSRef fetchedRefs[kMaxEntriesPerFetch];
FSCatalogInfo
fetchedInfos[kMaxEntriesPerFetch];
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden