FolderItem.NativePath

From Xojo Documentation

Read-Only Property (As String )
StringValue = aFolderItem.NativePath

Supported for all project types and targets.

The full path to the FolderItem using the path format native to the OS.

Notes

Applications should not assume that there is a trailing slash on the path returned when the FolderItem is a directory. If the trailing slash is required, the Directory property should be checked and the trailing slash appended based off of that value.

Unlike AbsolutePath, on macOS this returns the POSIX path (separated by slashes).

If the item is a directory (folder), the pathname ends with a backslash on Windows and with a forward slash on Linux.

When accessing a drive on Windows that you do not have permissions for or does not exist, there is no trailing slash. For example, "a:" is a floppy drive with no disk, "a:\" has a disk.

Example

This example displays the native path:

Var f As New FolderItem
MessageBox(f.NativePath)