3
{ Program to demonstrate the S_ISLNK function. }
10
if LStat (paramstr(1),info) then
12
if S_ISLNK(info.mode) then
13
Writeln ('File is a link');
14
if S_ISREG(info.mode) then
15
Writeln ('File is a regular file');
16
if S_ISDIR(info.mode) then
17
Writeln ('File is a directory');
18
if S_ISCHR(info.mode) then
19
Writeln ('File is a character device file');
20
if S_ISBLK(info.mode) then
21
Writeln ('File is a block device file');
22
if S_ISFIFO(info.mode) then
23
Writeln ('File is a named pipe (FIFO)');
24
if S_ISSOCK(info.mode) then
25
Writeln ('File is a socket');