FolderItem.GetRelative

From Xojo Documentation

Method

FolderItem.GetRelative(SaveInfo as String) As FolderItem

New in 5.0

Supported for all project types and targets.

Returns a FolderItem based on the string passed to it.

Notes

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

GetRelative 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

Dim path As String
Dim f, g As FolderItem
f = New FolderItem
g = f.GetRelative(f.GetSaveInfo(Volume(0).Child("Documents"), 0))
If g <> Nil Then
path = g.NativePath
End If