[Lazarus] CreateRelativePath document error.
Mattias Gärtner
nc-gaertnma at netcologne.de
Tue Feb 9 13:48:48 CET 2010
Zitat von Paul van Helden <paul at planetgis.co.za>:
>
> On 2010/02/09 01:36 PM, Juha Manninen wrote:
>> ExtractRelativePath seems to work well, thanks.
>> Now, damn, it seems that FileUtil.CreateRelativePath works correctly, too.
>> I was testing it in Lazarus Converter code and it used a version in
>> lazarus/ide/ideprogs/ instead of FileUtil, even though FileUtil is higher in
>> "uses" list.
>> I think there is some redundant and useless code in Lazarus, but it is
>> understandable in such a big project.
>>
>> So, these 2 work identically in my tests and you should be able to use them,
>> too:
>>
>> RelPath:=FileUtil.CreateRelativePath(PasFile, ABasePath);
>> RelPath:=ExtractRelativePath(ABasePath, PasFile);
>>
>>
>>
>>
> 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
Mattias
More information about the Lazarus
mailing list