Platforms to show: All Mac Windows Linux Cross-Platform

Back to CarbonApplicationEventsMBS class.

Previous items

CarbonApplicationEventsMBS.VolumeMounted(VolumeRefNum as Integer, VolumeRoot as FolderItem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Carbon Events MBS MacCF Plugin 2.8 ✅ Yes ❌ No ❌ No ❌ No
Called whenever a volume is mounted.
Example
sub VolumeMounted(VolumeRefNum as Integer)
dim s as String
dim f as FolderItem

f=NewVolumeFolderitemMBS(VolumeRefNum)
if f<>nil then
s=f.DisplayName
end if

List.InsertRow 0,"A volume was mounted: "+s
end sub

VolumeRefNum is the number of the mounted volume. You may keep a list of mounted volumes if you need to know which was is unmounted later.

Some examples using this event:

CarbonApplicationEventsMBS.VolumeUnmounted(VolumeRefNum as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Carbon Events MBS MacCF Plugin 2.8 ✅ Yes ❌ No ❌ No ❌ No
Called whenever a volume is unmounted.
Example
sub VolumeUnmounted(VolumeRefNum as Integer)
// If you keep a list you can identify the volume...
List.InsertRow 0,"A volume was unmounted."
end sub

VolumeRefNum is the number of the mounted volume. You may keep a list of mounted volumes if you need to know which was is unmounted later.

Some examples using this event:

Previous items

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


The biggest plugin in space...