[Lazarus] CreateRelativePath document error.

Michael Van Canneyt michael at freepascal.org
Tue Feb 9 14:20:47 CET 2010



On Tue, 9 Feb 2010, Paul van Helden wrote:

>
> On 2010/02/09 02:48 PM, Mattias Gärtner wrote:
>> Zitat von Paul van Helden <paul at planetgis.co.za>:
>> 
>>> 
>>> Good. What is the recommended function for the inverse process?
>> 
>> I don't know for the ExtractRelativePath, but for CreateRelativePath it is 
>> simple:
>> 
>> AbsolutePath:=AppendPathDelim(ABasePath)+RelPath
>> 
>> 
> I'm talking specifically about /relative/ paths, ie. ones with ../../../ in 
> them.
>
> On 2010/02/09 02:02 PM, Graeme Geldenhuys wrote:
>>   - ExpandFileName()
>>   - ExpandUNCFileName()
>>   - ExpandFileNameUTF8()
>>   - CleanAndExpandFilename()
>>   - ExpandUNCFileNameUTF8()
>>   - CleanAndExpandDirectory()
>>
>> 
> Graeme: you also missed this. None of those functions take a base path and 
> applies a relative path to produce a new absolute path. The function must be 
> able to go up some directories and then down some others.

ExpandFileName does exactly that.

Michael.


More information about the Lazarus mailing list