2 Issues in PersonalStorage FolderInfo.ContentCount

Hello,

  1. Using FolderInfo.GetContents(MessageKind.Normal Or MessageKind.FolderAssociatedInformation)
    To get all items, however, FolderInfo.ContentCount does not count the FAI items, like the ones inside Quick Step Settings, please kindly advise how to get the real items count?
    Does PersonalStorage.Store.GetTotalItemsCount include those FAI items? If not how to include them?
    (Happens in Ost file opened for read-only)

  2. When recursively enumerating all items each folder will show its item count by: FolderInfo.ContentCount
    If there’s only one non-empty folder inside it, FolderInfo.ContentCount will be zero, any way to get the number of all sub-folder items inside each folder?
    Why? To prevent drawing/saving real-empty folders at first place, I mean if there are 10 empty folders inside each other, at the root level we disregard it. Just curious if a way here?

Thanks :slight_smile:

@australian.dev.nerds,

This is a specific of PST format. The SDK only parses the corresponding field. ContentCount means the number of visible messages in the folder. To take FAI items and subfolders into account, we should to implement a more complex algorithm.

Thanks.

1 Like

oops, so easier (and maybe more efficient) if I do it at my Tree level afterwards, so forget about it :slight_smile: