Re: free disk space
From: Kelsey Bjarnason (kelseyb_at_xxnospamyy.lightspeed.bc.ca)
Date: 10/25/03
- Next message: Tim Prince: "Re: Is this the optimal FIR filter on all platforms?"
- Previous message: August Derleth: "Re: Barbecued Tri-Tip is better than C"
- In reply to: Nils Petter Vaskinn: "Re: free disk space"
- Next in thread: Dan Pop: "Re: free disk space"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Oct 2003 22:32:22 -0700
On Tue, 21 Oct 2003 12:50:11 +0000, Nils Petter Vaskinn wrote:
> On Tue, 21 Oct 2003 12:40:29 +0000, Joona I Palaste wrote:
>
>> Piotr <torwalds@wp.pl> scribbled the following:
>>> What is the simple function checking free disk space ?
>>> thank you
>>
>> There isn't one in standard C.
>
> open a file,
> write to the file until you get an error, counting bytes
> close and reopen the file to free the space
> close the file
>
> Now the filesystem should have atleast as much free space as the bytes you
> counted.
>
> But he'd probably be better of using a platform specific way :)
I can just picture doing this on a system with a large storage array...
say one of those nifty 43TB units. A week or two later and he finally has
his value... :)
- Next message: Tim Prince: "Re: Is this the optimal FIR filter on all platforms?"
- Previous message: August Derleth: "Re: Barbecued Tri-Tip is better than C"
- In reply to: Nils Petter Vaskinn: "Re: free disk space"
- Next in thread: Dan Pop: "Re: free disk space"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|