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

Mailing lists / fpc-devel / 2012-09
7 messages · 2 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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
Michael Schnell wroteIn 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.
Thanks a lot. I'll try this one.
-Michael
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
You need to use the fpstat function for this. The stat record contains the inode number.…
I did find the definition of the stat record in stat.inc, but I'm still not unclear how to make use of it.
-Michael
You need to use the fpstat function for this. The stat record contains the inode number.…
OK, I did find that I need to "use" baseunix.
Funny that fpstat is there and it's not necessary for fpstatfs...
Thanks,
-Michael
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