SharedMethod
FolderItem.CreateFromMacFSRef
Warning
This item was deprecated in version 2019r2. There is no replacement.
Description
Creates a FolderItem from the passed FSRef.
Notes
The method takes a MemoryBlock of size 80 containing a Mac OS FSRef structure that can be obtained from various Carbon File Manager functions, usually using the Declare statement.
This will only work on macOS. On Windows and Linux it raises a PlatformNotSupportedException.
Sample code
For purposes of illustration, this example creates a FolderItem from an internaly-generated MemoryBlock that contains a user-selected mp4 file.
Dim f As New FolderItem
Dim g As New FolderItem
f = GetOpenFolderItem("video/mp4") ' added using the File Types Editor
If f.MacFSRef <> Nil Then
g = f.CreateFromMacFSRef(f.MacFSRef)
MsgBox(g.NativePath)
Else
MsgBox("The MacFSRef was not created.")
End If
Compatibility
All project types on all supported operating systems.