Platforms to show: All Mac Windows Linux Cross-Platform

Back to DirectorySizeMBS class.

DirectorySizeMBS.Cancel as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether the Update function should stop as soon as possible.

(Read and Write property)

DirectorySizeMBS.CompressedSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 11.3 ❌ No ✅ Yes ❌ No ❌ No All
The size in bytes of all files.

If a file is compressed, we add here the compressed size.
If a file is not compressed, we add the normal logical size.
Only used on Windows and only with QueryCompressedSizes = true.
(Read only property)

DirectorySizeMBS.CountBundlesAsItem as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Whether to cound bundles as files.
Example
// chose a folder
dim f as FolderItem = SpecialFolder.Applications

// calculate
dim d1 as new DirectorySizeMBS
d1.CountBundlesAsItem = true

call d1.Update(f, true, 0)

dim d2 as new DirectorySizeMBS
d2.CountBundlesAsItem = false

call d2.Update(f, true, 0)

// display
MsgBox "Normal count: "+str(D2.FilesCount)+" files and "+str(d2.FolderCount)+" folders"+EndOfLine+_
"With bundles as files: "+str(D1.FilesCount)+" files and "+str(d1.FolderCount)+" folders"

Bundles like applications are counted as a single file if this property is true or as a folder with files inside if this property is false.
Default is false.
(Read and Write property)

DirectorySizeMBS.Directory as FolderItem

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The folder which was searched.

(Read and Write property)

DirectorySizeMBS.FilesCount as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of files counted.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.FilesCount)+" files"

FilesCount=VisibleFilesCount+HiddenFilesCount
(Read only property)

DirectorySizeMBS.FolderCount as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of folders counted.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.FolderCount)+" folder"

FolderCount=VisibleFolderCount+HiddenFolderCount
(Read only property)

DirectorySizeMBS.HiddenCompressedSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 11.3 ❌ No ✅ Yes ❌ No ❌ No All
The size in bytes of all hidden files.

If a file is compressed, we add here the compressed size.
If a file is not compressed, we add the normal logical size.
Only used on Windows and only with QueryCompressedSizes = true.
(Read only property)

DirectorySizeMBS.HiddenFilesCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of hidden files counted.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.HiddenFilesCount)+" hidden files"

A file is invisible if the Invisible flag is set for this file.
(Read and Write property)

DirectorySizeMBS.HiddenFolderCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of folders.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.HiddenFolderCount)+" hidden folders"

A file is invisible if the Invisible flag is set for this file.
(Read and Write property)

DirectorySizeMBS.HiddenItemCount as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of invisible items.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.HiddenItemCount)+" hidden items"

An item is invisible if the Invisible flag is set for this file.
HiddenItemCount=HiddenFolderCount+HiddenFilesCount
(Read only property)

DirectorySizeMBS.HiddenLogicalDataForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical size of the data forks of all hidden file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical data fork size of hidden files: "+Format(d.HiddenLogicalDataForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.HiddenLogicalResourceForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical size of the resource forks of all hidden file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical resource fork size of hidden files: "+Format(d.HiddenLogicalResourceForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.HiddenLogicalTotalSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical size of the all forks of all hidden file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical total size of hidden files: "+Format(d.HiddenLogicalTotalSize/1000000,"0")+" MB"

(Read only property)

DirectorySizeMBS.HiddenPhysicalDataForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical size of the data forks of all hidden file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical data fork size of hidden files: "+Format(d.HiddenPhysicalDataForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.HiddenPhysicalResourceForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical size of the resource forks of all hidden file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical resource fork size of hidden files: "+Format(d.HiddenPhysicalResourceForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.HiddenPhysicalTotalSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical size of the both forks of all hidden file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical total size of hidden files: "+Format(d.HiddenPhysicalTotalSize/1000000,"0")+" MB"

(Read only property)

DirectorySizeMBS.IgnoreHiddenFolderContent as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
If this flag is set, the Update method will not count invisible files.

(Read and Write property)

DirectorySizeMBS.ItemCount as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of items counted.
Example
// chose a folder
dim f as FolderItem = SpecialFolder.Music
// calculate size
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(true,0)

// show number of files
MsgBox str(d.ItemCount)

ItemCount=VisibleItemCount+HiddenItemCount
(Read only property)

DirectorySizeMBS.LogicalDataForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical data fork size in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical data fork size of all files: "+Format(d.LogicalDataForkSize/1000000,"0")+" MB"

(Read only property)

Some examples using this property:

DirectorySizeMBS.LogicalResourceForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical resource fork size in Bytes.

dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical resource fork size of all files: "+Format(d.LogicalResourceForkSize/1000000,"0")+" MB"
(Read only property)

Some examples using this property:

DirectorySizeMBS.LogicalTotalSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical total size in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical total size of all files: "+Format(d.LogicalTotalSize/1000000,"0")+" MB"

(ResourceFork+DataFork)
(Read only property)

Some examples using this property:

DirectorySizeMBS.PhysicalDataForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical data fork size in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical data fork size of all files: "+Format(d.PhysicalDataForkSize/1000000,"0")+" MB"

(Read only property)

Some examples using this property:

DirectorySizeMBS.PhysicalResourceForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical resource fork size in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical resource fork size of all files: "+Format(d.PhysicalResourceForkSize/1000000,"0")+" MB"

(Read only property)

Some examples using this property:

DirectorySizeMBS.PhysicalTotalSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical total file size in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical total size of all files: "+Format(d.VisiblePhysicalTotalSize/1000000,"0")+" MB"

(ResourceFork+DataFork)
That's what the Finder shows you.
(Read only property)

Some examples using this property:

DirectorySizeMBS.QueryCompressedSizes as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 11.3 ❌ No ✅ Yes ❌ No ❌ No All
Whether to query compressed file sizes on Windows.

(Read and Write property)

DirectorySizeMBS.RecursionLimit as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The limit for recursion.

Default is -1 for no limit.
Zero means we do not recurse into subfolders.
Other values define how many recursion levels are allowed.
(Read and Write property)

DirectorySizeMBS.RecursionMaxLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The maximum levels of recursions we had for searching this folder.

(Read and Write property)

DirectorySizeMBS.VisibleCompressedSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 11.3 ❌ No ✅ Yes ❌ No ❌ No All
The size in bytes of all visible files.

If a file is compressed, we add here the compressed size.
If a file is not compressed, we add the normal logical size.
Only used on Windows and only with QueryCompressedSizes = true.
(Read only property)

DirectorySizeMBS.VisibleFilesCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of visible files.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.VisibleFilesCount)+" visible files"

(Read and Write property)

DirectorySizeMBS.VisibleFolderCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of visible folders.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.VisibleFolderCount)+" visible folders"

(Read and Write property)

DirectorySizeMBS.VisibleItemCount as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of visible items.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox str(d.VisibleItemCount)+" visible items"

Items are folders or files.
VisibleItemCount=VisibleFolderCount+VisibleFilesCount
(Read only property)

DirectorySizeMBS.VisibleLogicalDataForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical size of the data forks of all visible file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical data fork size of visible files: "+Format(d.VisibleLogicalDataForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.VisibleLogicalResourceForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical size of the resource forks of all visible file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical resource fork size of visible files: "+Format(d.VisibleLogicalResourceForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.VisibleLogicalTotalSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The logical size of the both forks of all visible file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Logical total size of visible files: "+Format(d.VisibleLogicalTotalSize/1000000,"0")+" MB"

(Read only property)

DirectorySizeMBS.VisiblePhysicalDataForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical size of the data forks of all visible file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical data fork size of visible files: "+Format(d.VisiblePhysicalDataForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.VisiblePhysicalResourceForkSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical size of the resource forks of all visible file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical resource fork size of visible files: "+Format(d.VisiblePhysicalResourceForkSize/1000000,"0")+" MB"

(Read and Write property)

DirectorySizeMBS.VisiblePhysicalTotalSize as UInt64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The physical size of the both forks of all visible file in Bytes.
Example
dim f as FolderItem = SpecialFolder.desktop
dim d as DirectorySizeMBS = f.CalculateDirectorySizeMBS(True,0)
MsgBox "Physical total size of visible files: "+Format(d.VisiblePhysicalTotalSize/1000000,"0")+" MB"

(Read only property)

DirectorySizeMBS.YieldTicks as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS Util Plugin 7.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
How much time is given back to Xojo for other ticks.
Example
dim d as DirectorySizeMBS // your DirectorySizeMBS object
d.YieldTicks=6 // only use 1/10th of a second

If value is greater than zero, the application will yield to another Xojo thread after the given number of ticks have passed. 60 ticks are one second. Using a small value can slow down processing a lot while a big value keeps your application not responding to mouse clicks.
If you use this property with e.g. 6 as the value, you may also want to use this method in a thread so you can handle mouse events or let Xojo redraw a progressbar.
(Read and Write property)

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...