Roger Oberholtzer wrote:
I use the following in a program. It wants to know about free space on
the disk where a data file is, as that is what we are interested in. It
should be enough to get you started. It works on SVR4/5 and Linux. The
comments are just what was there.

int DiskFreeSpace()
{
     struct statvfs fsbuf;

     // We use the name of the .set file, which always exists, and is
     // always on the same file system as all the other files created.
     // As the set file is not open, we use statvfs() to find out about
     // the file system on which the set file is being written.

if (statvfs(set_name, &fsbuf) == ISERROR) return(0);


Thanks, Roger. I believe that's exactly what I was looking for. Now to see if I can compile it ...

Wonder why there is no man page on statvfs? Looks like I have a .h file.

Michael

_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://smtp.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to