Well, I am not going to work it out for you, as you should figure it
out for yourself (you are the one working on it). If you have to make
your solution robust though, (and maybe you should) you can look at
the source of coreutils/src/df (df is part of the GNU coreutils). Then
you can either make a new _C addon_ to nodejs. You can implement df-
like logic/functionality as much as nodejs allows you to as well. What
cwolves has pointed out is one way of doing it. But you are the master
of your own ship, so you have to know what are your requirements.
I guess a question which needs to be answered is how a tool like df
actually works. In this train of thought, maybe fs.*stat and friends
can be helpful ;-).
btw, if you feel like reading some _c_ code:
http://ftp.gnu.org/gnu/coreutils/
Good luck.