Disk Usage

Is there a c/c++ funtion to get the disk usage space?? I know a shell
command ‘du’, but not sure how to do it in the code…anyone can help??

“ran zhang” <rzhang@vamcointernational.com> wrote in message
news:9ov2vr$b61$3@inn.qnx.com

Is there a c/c++ funtion to get the disk usage space?? I know a shell
command ‘du’, but not sure how to do it in the code…anyone can help??

disk_space()


Mario Charest <mcharest@clipzinformatic.com> wrote:

“ran zhang” <> rzhang@vamcointernational.com> > wrote in message
news:9ov2vr$b61$> 3@inn.qnx.com> …
Is there a c/c++ funtion to get the disk usage space?? I know a shell
command ‘du’, but not sure how to do it in the code…anyone can help??

disk_space()

disk_space() corresponds to ‘df’ output, not ‘du’ output. It does it
on a per-device basis, not per-directory tree basis.

Somebody supplied sample code in the other QNX4 conference to recurvisely
walk the directory tree, which is the way that ‘du’ does it.

-David

QNX Training Services
dagibbs@qnx.com