[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

ResolveDots

Removes duplicate path delimiters and resolves . and ..

Declaration

Source position: lazfileutils.pas line 60

function ResolveDots(

  const AFilename: string

):string;

Description

This function shortens duplicate path delimiters to single path delimiters. It resolves 'A/../B' to 'B', which might be wrong under Unix if A is a symlink. The functions does not check the file system. The single dot './A' is resolved to 'A', but a single '.' is retained.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.