[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Checks whether the specified file name is a symbolic link on the local file system.
Source position: lazfileutils.pas line 50
procedure CheckIfFileIsSymlink( |
const AFilename: string |
); |
AFilename |
|
File name examined in the routine. |
CheckIfFileIsSymlink is a routine used to ensure that the file name specified in AFilename is a valid symbolic link on the local file system. It acts as an assert for the pre-condition.
The implementation for the routine is platform- or OS-specific. In general, all of the platforms raise an exception if the file name does not exist on the local file system of when the file name is not a symbolic link. The mechanism used to check for a symbolic link is platform-dependent.
For the Windows platform, the file name must be a link create using mklink on the local file system.
For UNIX-like platforms, the FpReadLink routine is called to examine the file name. The value from fpGetErrNo is used to get specific error information that can be used in the exception. For example:
Calling CheckIfFileIsSymlink on the Amiga platform will always result in an exception. Symbolic links are not supported on the Amiga platform.
Raises an exception if the specified file does not exist on the local file system, or the file is a regular file and not a symbolic link.
Version 3.2 | Generated 2024-02-25 | Home |