Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Feb 2008 17:25:39 +0700 (ICT)
From:      Olivier Nicole <on@cs.ait.ac.th>
To:        freebsd-questions@freebsd.org
Subject:   Get the empty space on a file system
Message-ID:  <200802181025.m1IAPdHc060834@banyan.cs.ait.ac.th>

next in thread | raw e-mail | index | archive | help
Hi,

I am writing a C application that would store files in a directory.

Before it starts storing files, I would like the application to check
is there is enough space in the file system.

How to:

1) knowing the name of the directory, how toknow the file system it
   belongs to (not considering symbolic links, I can decide that the
   directory is always a real path);

2) knowing the file system from 1), how to check the remaining space
   in the file system?

Thanks in advance,

olivier



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802181025.m1IAPdHc060834>