Sign in Join
FPDoc Onlineexperiment

ComparePhysicalFilenames function

In unit FileUtil

Compares file names after resolving symbolic links.

Declaration

pascal
function ComparePhysicalFilenames(const Filename1: string; 
 const Filename2: string): Integer

Arguments

Filename1

First file name resolved and used in the comparison.

Filename2

Second file name resolved and used in the comparison.

Function result

Relative sort order for the compared values.

Description

ComparePhysicalFilenames, like CompareFileNames, is used to compare file name using the case-sensitivity enforced for file names on the platform.

Calls GetPhysicalFilename to ensure that values in Filename1 and Filename2 are resolved to the actual file names on the local file system. This is significant for UNIX-like platforms where the file name arguments may be symbolic links on the file system.

Calls CompareFileNames in LazFileUtils to perform the comparison and get the return value for the routine.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.