<div class="meta" robots="noindex">

</div>

SharedMethod

# FolderItem.CreateFromMacFSRef

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. There is no replacement.

</div>

## Description

Creates a `FolderItem</api/files/folderitem>` from the passed FSRef.

## Notes

The method takes a `MemoryBlock</api/language/memoryblock>` of size 80 containing a Mac OS FSRef structure that can be obtained from various Carbon File Manager functions, usually using the `Declare</api/language/declare>` statement.

This will only work on macOS. On Windows and Linux it raises a `PlatformNotSupportedException</api/exceptions/platformnotsupportedexception>`.

## Sample code

For purposes of illustration, this example creates a FolderItem from an internaly-generated `MemoryBlock</api/language/memoryblock>` that contains a user-selected mp4 file.

``` xojo
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.

## See also

`PlatformNotSupportedException</api/exceptions/platformnotsupportedexception>`.
