Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2012-09

inode number

7 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Schnell

In the RTL, is there an encapsulation for finding the inode number of a file in an extX file system ? Or dis anybody already do code for this ?

Thanks,
-Michael

Reply by email

Unknown author
to Michael Schnell
Michael Schnell wrote
In the RTL, is there an encapsulation for finding the inode number of a file in an extX file system ? Or dis anybody already do code for this ?

You need to use the fpstat function for this. The stat record contains the inode number.

Michael.

Reply by email

Michael Schnell
to Unknown author
Show quoted text 12 lines
On Mon, 24 Sep 2012, Michael Schnell wrote: > In the RTL, is there an encapsulation for finding the inode number of > a file in an extX file system ? Or dis anybody already do code for > this ? You need to use the fpstat function for this. The stat record contains the inode number.

Thanks a lot. I'll try this one.

-Michael

Reply by email

Michael Schnell
to Unknown author: You need to use the fpstat function for this. The stat record contains the inode number.…
Show quoted text 5 lines
You need to use the fpstat function for this. The stat record contains the inode number.

While with

uses libc, Linux, Unix, unixtype;

I can use the Function "fpStatFS(Path:ansistring;Info:PStatfs):cint;" (which provides useful information of the filer system) successfully, and I did find

"function Fpstat(path: pchar; var buf: stat):cint; [public, alias : 'FPC_SYSC_STAT'];"

in /linux/ossysc.inc;

I can't find a way to call Fpstat(), nor do I find what the type "stat" used there is supposed to be.

Thanks again,
-Michael

Reply by email

Michael Schnell
to Michael Schnell
Funny that fpstat is there and it's not necessary for fpstatfs...

And funny that fpstat uses a var parameter, while fpstatfs needs an explicit pointer to the return record.

Anyway. it works fine now.

Thanks again,
-Michael

Reply by email