Platforms to show: All Mac Windows Linux Cross-Platform

Back to DirectorySizeMBS class.

DirectorySizeMBS.Add(d as DirectorySizeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 8.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds the values of the given directory size object to the current one.

Passing nil is okay and will be ignored.
This method was added to support counting several folders and adding the results to one central object.

DirectorySizeMBS.close

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 4.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

There is no need to call this method except you want to free all resources of this object now without waiting for Xojo to do it for you.

DirectorySizeMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.

DirectorySizeMBS.Update(folder as folderitem, recursive as boolean, ticks as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin 3.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Updates the class.
Example
// chose a folder
dim f as FolderItem = SpecialFolder.Applications

// calculate
dim d as new DirectorySizeMBS

// update object
call d.Update(f, true, 0)

// display
MsgBox str(d.FilesCount)+" files and "+str(d.FolderCount)+" folders"

The folder specified is searched for files and folders. Normally you'd better use CalculateDirectorySizeMBS.

Ticks is the count of ticks (1/60th second) which must pass till time is given to other threads. (e.g. 10)
Returns true if successfull.

If you call this function in a thread you can set the cancel property in a pushbutton event handler to stop this function.

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


The biggest plugin in space...