FolderItem.FromSaveInfo

From Xojo Documentation

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

Var path As String
Var f, g As FolderItem
f = New FolderItem
g = f.FromSaveInfo(f.SaveInfo(FolderItem.DriveAt(0).Child("Documents"), 0))
If g <> Nil Then
path = g.NativePath
End If