From Xojo Documentation
| This item was deprecated in version 2019r2.
Please use FolderItem.SaveInfo as a replacement.
Allows saving FolderItem references without relying on the absolute path.
The returned string indicates a path which is relative to the supplied RelativeTo folder. You may pass Nil to indicate that you do not care for a relative resolution of the path (this is, for instance, still useful on macOS where renamed and moved files can still be found with the FolderItem.GetRelative function nonetheless).
The Class Constants and values for Mode are:
|SaveInfoDefaultMode||0||The FolderItem should be open in any way that it can possibly be created. This is the default value.|
|SaveInfoRelativeMode||1||The FolderItem should only be opened using relative path information.|
|SaveInfoAbsoluteMode||2||The FolderItem should only be opened using absolute path information.|
|The returned string is not intended to be human-readable and any modifications may render it useless.|
Shows how a GetSaveInfo string can be used with GetRelative to open a file and show its path:
f = New FolderItem
g = f.GetRelative(f.GetSaveInfo(Volume(0).Child("Documents"), FolderItem.SaveInfoDefaultMode))
If g <> Nil Then
TextField1.Text = g.NativePath
MsgBox("FolderItem does not exist!")
You can also use GetFolderItem to open a GetSaveInfo string:
Dim f As FolderItem
f = GetFolderItem(saveInfo, FolderItem.PathTypeNative)