MBS Xojo Developer Conference and Training
Join us from 3rd to 6th May 2017 in Berlin, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.Is there a way to use the MBS plugin to get only the visible item and folder count on a volume?
Feedback.

Answer: You can use the DirectorySizeMBS class for this as in the example below:
Example:
dim d as DirectorySizeMBS

d=new DirectorySizeMBS

// volume(1) as my boot volume is very full
if d.update(volume(1),true,0) then
MsgBox str(d.VisibleItemCount)+" visible items, "+str(d.HiddenItemCount)+" invisible items."
end if
Notes:
Complete Question: Is there a way to use the MBS plugin to get only the visible item and folder count on a volume? The FileCount and FolderCount properties of
VolumeInformationMBS seem to provide the total # of items including
invisible items such as .DS_Store and more importantly .Trashes which
is causing me a great amount of difficulty during a recursive scan of a
volume. I've got a progress bar which uses the total of the filecount
and foldercount properties as the maximum value, but my routine needs
to filter out all invisible items, as it is creating a catalog of a
volume for archiving purposes. Any thoughts how I could get accurate
number.




Links
MBS Xojo Plugins