Sign in Join
FPDoc Onlineexperiment

GetPhysicalFilename function

In unit LazFileUtils

Gets the physical file name for a symbolic link on the local file system.

Declaration

pascal
function GetPhysicalFilename(const Filename: string; 
 OnError: TPhysicalFilenameOnError): string

Description

GetPhysicalFilename is a String function used to get the physical file name on the local file system for the specified symbolic link.

Filename contains the symbolic link to resolve in the function.

OnError is a TPhysicalFilenameOnError enumeration value that indicates the action performed if a physical file name cannot be determined for the symbolic link. When OnError contains pfeException, an exception is raised for the unresolved file name. When OnError contains pfeOriginal, the unresolved symlink is used as the return value.

The implementation of GetPhysicalFilename is platform- or OS-dependent. For UNIX-like environments (which support symbolic links), the GetUnixPhysicalFilename function is called to retrieve the file name for the symlink. For other platforms and environments, like Amiga and Windows, symbolic links are not supported and the return values always contains the value in Filename.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.