commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Roberts" <>
Subject RE: FileSystemUtils
Date Tue, 22 Nov 2005 20:56:02 GMT
You may be able to use BigInteger (arbitrary precision).

-----Original Message-----
From: Frank W. Zammetti [] 
Sent: 22 November 2005 20:35
To: Jakarta Commons Developers List
Subject: Re: FileSystemUtils

Your welcome :) (I wrote that function :) )

I think your right, a double version would certainly be appropriate.  Kind
of ashamed I missed that actually :(

I wonder though, what would be the down-side to just having a double
version only? (aside from backward-compatibility at this point)... Would
it really result (potentially) in a loss of precision?

Feel free to submit a patch, it seems, to me anyway, like an obvious thing
to commit, although I am not a committer, so you'll have to convince
others :)

Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
AIM: fzammetti
Yahoo: fzammetti

On Tue, November 22, 2005 3:25 pm, Marcelo Nery dos Santos said:
> Hi,
> After studying the Jakarta Commons IO API, I found a great method that
> allows me to delete some native code from my system, it is the:
> static long FileSystemUtils.freeSpace(String path)
> However, as it return type is long, I am in trouble to represent
> values greater than 2GB. Is it possible to add another method into
> this class? I would suggest something like:
> static double getApproximateFreeSpace(String path)
> Thus, if a general (possibly high) approximate value is needed, this
> method could be used. In situations where an exact value is needed,
> typically, when we are running low in space, the original 'static long
> freeSpace(String path)' would fit.
> I think this comment is also valid in other areas of the IO package.
> However, it is more critical when dealing with file system comprising
> several gigabytes of free space. By the javadoc, it is not clear what
> value is returned if a free space larger than 2GB if available.
> Thanks for this great package.
> Marcelo
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message