[Overview][Constants][Types][Procedures and functions][Index] Reference for unit 'BaseUnix' (#rtl)

fpS_ISLNK

Is file a symbolic link

Declaration

Source position: bunxovlh.inc line 90

function fpS_ISLNK(

  m: TMode

):Boolean;

Description

FpS_ISLNK checks the file mode m to see whether the file is a symbolic link. If so it returns True

See also

FpFStat

  

Retrieve file information about a file descriptor.

FpS_ISFIFO

  

Is file a FIFO

FpS_ISREG

  

Is file a regular file

FpS_ISCHR

  

Is file a character device

FpS_ISBLK

  

Is file a block device

FpS_ISDIR

  

Is file a directory

FpS_ISSOCK

  

Is file a Unix socket

Example

Program Example53;

{ Program to demonstrate the S_ISLNK function. }

Uses BaseUnix,Unix;

Var Info : Stat;

begin
  if fpLStat (paramstr(1),@info)=0 then
    begin
    if fpS_ISLNK(info.st_mode) then
      Writeln ('File is a link');
    if fpS_ISREG(info.st_mode) then
      Writeln ('File is a regular file');
    if fpS_ISDIR(info.st_mode) then
      Writeln ('File is a directory');
    if fpS_ISCHR(info.st_mode) then
      Writeln ('File is a character device file');
    if fpS_ISBLK(info.st_mode) then
      Writeln ('File is a block device file');
    if fpS_ISFIFO(info.st_mode) then
      Writeln ('File is a named pipe (FIFO)');
    if fpS_ISSOCK(info.st_mode) then
      Writeln ('File is a socket');
    end;
end.

Documentation generated on: Jun 23 2021