Platforms to show: All Mac Windows Linux Cross-Platform

Back to ResourceForkMBS class.

ResourceForkMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS MacClassic Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The internal handle to the resource fork.

(Read only property)

ResourceForkMBS.LastError as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS MacClassic Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The last error code.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rsrc")
dim r as ResourceForkMBS = ResourceForkMBS.Open(f, false) // open read only

r.AddResource "Hello World", "TEXT", 128, "just a test"
MsgBox str(R.LastError) // shows -61, write permission error

All methods set this property.
(Read and Write property)

ResourceForkMBS.Modified as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS MacClassic Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Whether the resource fork has been modified by you.

(Read only property)

ResourceForkMBS.TypeCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS MacClassic Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The number of resource types present in the resource fork.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rsrc")
dim r as ResourceForkMBS = ResourceForkMBS.create(f)

r.AddResource "Hello World", "TEXT", 128, "just a test"

MsgBox str(r.TypeCount) // shows 1

(Read only property)

ResourceForkMBS.Writable as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Files MBS MacClassic Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Whether the resourcefork was opened writable.

(Read only property)

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


The biggest plugin in space...