Topic Path: Symbol Reference > Functions > ProcessPath Function
ContentsIndexHome
PreviousUpNext
ProcessPath Function

Resolves a directory path containing relative path information.

File
function ProcessPath(
    const ABasePath: String; 
    const APath: String; 
    const APathDelim: string = '/'
): string;
Parameters 
Description 
ABasePath 
The path to use for the current directory in relative path information.
 
APath 
The path including relative directoryinformation to be resolved.
 
APathDelim 
Path delimiter. Default value is '/'. 

String - File system directory path after resolution.

ProcessPath is a String function that performs directory path resolution for the values specified in ABasePath and APath. ABasePath is the absolute directory in the local file system to be used as the current directory when resolving path information in APath. 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 ABasePath is assigned as the return value for ProcessPath. When APath does not begin with the symbol for the root directory ('/'), the value in ABasePath 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 '../'.

Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.