FolderItem.FromSaveInfo

From Xojo Documentation

Shared Method

FolderItem.FromSaveInfo(saveInfo As String) As FolderItem

New in 2019r2

Supported for all project types and targets.

Returns a FolderItem based on the SaveInfo passed to it.

Notes

If the SaveInfo indicates a relative path, the current FolderItem is considered its reference point. If the SaveInfo passed to it is absolute, then the current FolderItem is ignored when resolving the path.

FromSaveInfo returns Nil only if there is not sufficient information in SaveInfo to construct a FolderItem (e.g., using a relative path that causes the parsing to descend below root level).

Example

// the SaveInfo was previously retrieved from FolderItem.SaveInfo and saved somewhere,
// such as a preferences file.
Var saveInfo As String // Assign your SaveInfo to this variable

Var path As String
Var file As FolderItem
file = FolderItem.FromSaveInfo(saveInfo)
If file <> Nil Then
path = file.NativePath
End If