FolderItem.NativePath

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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 that value (backslash on Windows and forward slash on Linux).

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

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)