FolderItem methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to FolderItem class.

FolderItem.VolumeSizeMBS as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Files MBS Util Plugin ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the size on the volume which the folderitem objects points to.
Example
// 1. a short:
msgBox "The volume with your system folder is "+str(specialfolder.system.volumeSizeMBS)+" big."
// 2. a nicer:
dim d as Double
dim s as string

d=SpecialFolder.System.volumesizeMBS

if d>10000.0 then
if d>10000000.0 then
if d>10000000000.0 then
s=format(d/1024.0/1024.0/1024.0,"0")+" GigaBytes"
else
s=format(d/1024.0/1024.0,"0")+" MegaBytes"
end if
else
s=format(d/1024.0,"0")+" KiloBytes"
end if
else
s=format(d,"0")+" Bytes"
end if

msgBox "Your drive with the system folder is "+s+" big."

This should be used to handle any volume size.
Return value changed in version 10.0 from double to SInt64.

Added Linux support in version 16.0.
Returns -1 on error.

Some examples using this method:

Blog Entries

Xojo Developer Magazine

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


💬 Ask a question or report a problem