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

</div>

Method

# FolderItem.GetSaveInfo

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

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `FolderItem.SaveInfo<folderitem.saveinfo>` as a replacement.

</div>

## Description

Allows saving **FolderItem** references without relying on the absolute path.

## Notes

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.FromSaveInfo<folderitem.fromsaveinfo>` function nonetheless).

The Class Constants and values for *Mode* are:

| Class Constant       | Value | Description                                                                                          |
|----------------------|-------|------------------------------------------------------------------------------------------------------|
| 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.                                |

<div class="note">

<div class="title">

Note

</div>

The returned string is not intended to be human-readable and any modifications may render it useless.

</div>

## Sample code

Shows how a <span class="title-ref">GetSaveInfo</span> string can be used with GetRelative to open a file and show its path:

``` xojo
Dim f, g As FolderItem
f = New FolderItem
g = f.GetRelative(f.GetSaveInfo(Volume(0).Child("Documents"), FolderItem.SaveInfoDefaultMode))
If g <> Nil Then
  TextField1.Text = g.NativePath
Else
  MsgBox("FolderItem does not exist!")
End If
```

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

You can also use GetFolderItem to open a <span class="title-ref">GetSaveInfo</span> string:

``` xojo
Dim saveInfo As String ' Assign a saveInfo string from a previously accessed file

Dim f As FolderItem
f = GetFolderItem(saveInfo, FolderItem.PathTypeNative)
```

## Compatibility

All project types on all supported operating systems.

## See also

`FolderItem</api/files/folderitem>` parent class
