|
@@ -2,7 +2,7 @@ program example28;
|
|
|
|
|
|
{ Program to demonstrate the FStat function. }
|
|
{ Program to demonstrate the FStat function. }
|
|
|
|
|
|
-uses linux;
|
|
|
|
|
|
+uses BaseUnix;
|
|
|
|
|
|
var f : text;
|
|
var f : text;
|
|
i : byte;
|
|
i : byte;
|
|
@@ -15,25 +15,25 @@ begin
|
|
for i:=1 to 10 do writeln (f,'Testline # ',i);
|
|
for i:=1 to 10 do writeln (f,'Testline # ',i);
|
|
close (f);
|
|
close (f);
|
|
{ Do the call on made file. }
|
|
{ Do the call on made file. }
|
|
- if not fstat ('test.fil',info) then
|
|
|
|
|
|
+ if fpstat ('test.fil',info)<>0 then
|
|
begin
|
|
begin
|
|
- writeln('Fstat failed. Errno : ',linuxerror);
|
|
|
|
- halt (1);
|
|
|
|
|
|
+ writeln('Fstat failed. Errno : ',fpgeterrno);
|
|
|
|
+ halt (1);
|
|
end;
|
|
end;
|
|
writeln;
|
|
writeln;
|
|
writeln ('Result of fstat on file ''test.fil''.');
|
|
writeln ('Result of fstat on file ''test.fil''.');
|
|
- writeln ('Inode : ',info.ino);
|
|
|
|
- writeln ('Mode : ',info.mode);
|
|
|
|
- writeln ('nlink : ',info.nlink);
|
|
|
|
- writeln ('uid : ',info.uid);
|
|
|
|
- writeln ('gid : ',info.gid);
|
|
|
|
- writeln ('rdev : ',info.rdev);
|
|
|
|
- writeln ('Size : ',info.size);
|
|
|
|
- writeln ('Blksize : ',info.blksze);
|
|
|
|
- writeln ('Blocks : ',info.blocks);
|
|
|
|
- writeln ('atime : ',info.atime);
|
|
|
|
- writeln ('mtime : ',info.mtime);
|
|
|
|
- writeln ('ctime : ',info.ctime);
|
|
|
|
|
|
+ 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 }
|
|
{ Remove file }
|
|
erase (f);
|
|
erase (f);
|
|
end.
|
|
end.
|