[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ShellCtrls' (#lcl)

# TCustomShellTreeView.Path

Path to the directory displayed in the shell control.

## Declaration

Source position: shellctrls.pas line 142

`public property TCustomShellTreeView.Path : string read GetPath write SetPath;`

## Description

Path is a String property which represents the path on the local file system to the Selected tree node in the control.

Reading the value for the property calls the GetPathFromNode method to derive the value for the property using the Selected tree node. The full path for the TShellTreeNode is used, with a path delimiter appended for a directory entry. If the path is not absolute, the base path name is prepended to the path value.

Setting the value for the property causes the new value to be resolved to a fully-qualified path name when needed. A relative path is expanded into a fully-qualified absolute path value resolved relative to the base path in Root.

An EInvalidPath exception is raised if Path is set to a value that is not valid, including:

- The path does not exist on the local file system.
- The path cannot be resolved as a directory located under the Root directory.
- The path represents an entry not valid for the settings in ObjectTypes.

## See also

TCustomShellTreeView.GetPathFromNode |  | Returns the path (including the file name) for the file system object represented in the specified node.
TCustomShellTreeView.GetRootPath |  | Returns the effective value for Root when an explicit value has not been assigned.
TCustomShellTreeView.ExistsAndIsValid |  | Checks whether the specified path is a valid file system object and type for the tree view control.
TCustomShellTreeView.ObjectTypes |  | Indicates the file system objects displayed using the control.
EInvalidPath |  | Exception raised for an invalid path in shell controls.
FilenameIsAbsolute