Pascal / BaseUnix / fpLstat
FpAccess, FpAlarm, FpChdir, FpChmod, FpChown, FpClose, FpClosedir, FpDup, FpDup2, FpExecv, FpExecve, FpExit, FpFcntl, pfdfillset, fpFD_CLR, fpFD_ISSET, fpFD_SET, fpFD_ZERO, FpFork, FPFStat, FpFtruncate, FpGetcwd, FpGetegid, FpGetEnv, fpgeterrno, FpGeteuid, FpGetgid, FpGetgroups, FpGetpgrp, FpGetpid, FpGetppid, fpGetPriority, FpGetuid, FpIOCtl, FpKill, FpLink, FpLseek, » fpLstat, FpMkdir, FpMkfifo, Fpmmap, Fpmunmap, FpNanoSleep, fpNice, FpOpen, FpOpendir, FpPause, FpPipe, FpRead, FpReaddir, fpReadLink, FpRename, FpRmdir, fpSelect, fpseterrno, FpSetgid, fpSetPriority, FpSetsid, fpsettimeofday, FpSetuid,
Funcion: fpLstat()
Sintaxis:
function fpLstat(
 
  path: pchar;
 
  Info: PStat
 
):cInt;
 
function fpLstat(
 
  Filename:

Descripcion: Retorna informacion acerca de el link especificado en el Path, y guarda la informacion en info, la cual apunta a un registro de tipo TStat. Contrario a FpFstat, este almacena informacion acerca del link, no acerca del archivo al que apunta. La funcion retorna zero si la llamada fue correcta, y nu valor diferente de zero si ocurre un error.

ERRORES:
Mas informacion acerca de la funcion pueden ser retornados por FpGetErrno.

sys_enoent
Path no existe

Vea tambien
FpFStat, #rtl.unix.StatFS
Ejemplo:
program example29;
 
{ Program to demonstrate the LStat function. }
 
uses BaseUnix,Unix;
 
var f : text;
    i : byte;
    info : stat;
 
begin
  { Make a file }
  assign (f,'test.fil');
  rewrite (f);
  for i:=1 to 10 do writeln (f,'Testline # ',i);
  close (f);
  { Do the call on made file. }
  if fpstat ('test.fil',info)<>0 then
     begin
     writeln('Fstat failed. Errno : ',fpgeterrno);
     halt (1);
     end;
  writeln;
  writeln ('Result of stat on file ''test.fil''.');
  writeln ('Inode   : ',info.st_ino);
  writeln ('Mode    : ',info.st_mode);
  writeln ('nlink   : ',info.st_nlink);
  writeln ('uid     : ',info.st_uid);
  writeln ('gid     : ',info.st_gid);
  writeln ('rdev    : ',info.st_rdev);
  writeln ('Size    : ',info.st_size);
  writeln ('Blksize : ',info.st_blksize);
  writeln ('Blocks  : ',info.st_blocks);
  writeln ('atime   : ',info.st_atime);
  writeln ('mtime   : ',info.st_mtime);
  writeln ('ctime   : ',info.st_ctime);
 
  If  fpSymLink ('test.fil','test.lnk')<>0 then
    writeln ('Link failed ! Errno :',fpgeterrno);
 
  if  fplstat ('test.lnk',@info)<>0 then
     begin
     writeln('LStat failed. Errno : ',fpgeterrno);
     halt (1);
     end;
  writeln;
  writeln ('Result of fstat on file ''test.lnk''.');
  writeln ('Inode   : ',info.st_ino);
  writeln ('Mode    : ',info.st_mode);
  writeln ('nlink   : ',info.st_nlink);
  writeln ('uid     : ',info.st_uid);
  writeln ('gid     : ',info.st_gid);
  writeln ('rdev    : ',info.st_rdev);
  writeln ('Size    : ',info.st_size);
  writeln ('Blksize : ',info.st_blksize);
  writeln ('Blocks  : ',info.st_blocks);
  writeln ('atime   : ',info.st_atime);
  writeln ('mtime   : ',info.st_mtime);
  writeln ('ctime   : ',info.st_ctime);
  { Remove file and link }
  erase (f);
  fpunlink ('test.lnk');
end.

Librerias Pascal

Libreria crt - CRT - Pantalla y teclado del PASCAL de Turbo que maneja la unidad
Libreria dos - DOS - Interface Turbo Pascal MS-DOS
Libreria Graph - Unidad para manipular los graficos de la pantalla compatible con TP
Libreria Objects - Objetos basicos compatible con TP
Libreria math - Rutinas adicionales matematicas
Libreria Printer - Provee de acceso a la impresora
Libreria strings - Rutinas para el manejo de cadenas
Libreria BaseUnix - Funcionalidad Basica de Linux
Libreria System - Manejo de Archivos - Funciones para la manipulacion de archivos en Pascal