Internet Direct (Indy) Version 9.0.1 Beta
ProcessPath
Resolves a directory path containing relative path information.

function ProcessPath(CurrentDir: String; Var APath: String): String;
Parameters
CurrentDir: String
The currently selected file system path.

Var APath: String
The relative path to be resolved.

Returns
String - File system directory path after resolution.

Description
ProcessPath is a String function that performs directory path resolution for the values specified in CurrentDir and APath. CurrentDir is the currently selected file system area. APath can contain a relative file path, or a fully-qualified path name to be resolved by the function.

ProcessPath is used when TIdFTPServer.CurrentDir and TIdFTPServer.List are used with path specifiers. ProcessPath is also used when TIdHTTP is used with a URL that contains relative path information.

When APath is an empty string (''), the value in CurrentDir is assigned as the return value for ProcessPath. When APath does not begin with the symbol for the root directory ('/'), the value in CurrentDir is prepended to the value in APath for resolution.

When APath indicates a path relative to the current directory ('./'), additional directory path resolution is performed. Otherwise, the value in APath is used as the return value for ProcessPath.

The process of directory path resolution involves tracking directory information for any directory path prior to the reference to a relative directory using './' or '../'.