delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/12/22:33:43

Date: Thu, 12 Mar 1998 19:33:25 -0800 (PST)
Message-Id: <199803130333.TAA08535@adit.ap.net>
Mime-Version: 1.0
To: "Neil" <reply_to_me AT the DOT newsgroup>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: DJGPP newbie

At 04:25  3/12/1998 -0000, Neil wrote:
>I am used to writing C programs on UNIX. Now I need to write a noddy C
>program for  DOS that outputs the amount of free disk space.
>
>I did write a version of "df" on UNIX, is there an equivalent of the statfs
>structure using DJGPP, or alternatively what's the easiest  was of finding
>free disk space (apart from cutting up the output of system("dir c:\");...)

Yes, It's called `statfs'. :) I believe it's the same interface as Unix. See
its docs.

Incidentally, `df' comes with the ported GNU fileutils package, so you're
reinventing the wheel. Not that there's anything *wrong* with that... :)

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019