commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (IO-34) [io] FileSystemUtils returns incorrect free space on Linux
Date Tue, 06 Jun 2006 12:34:43 GMT
     [ http://issues.apache.org/jira/browse/IO-34?page=all ]
     
Stephen Colebourne reopened IO-34:
----------------------------------


Reopening to change versions

> [io] FileSystemUtils returns incorrect free space on Linux
> ----------------------------------------------------------
>
>          Key: IO-34
>          URL: http://issues.apache.org/jira/browse/IO-34
>      Project: Commons IO
>         Type: Bug

>     Versions: 1.1 Final
>  Environment: Operating System: Linux
> Platform: Other
>     Reporter: Niall Gallagher
>      Fix For: 1.2 Final

>
> Re: Commons-IO class FileSystemUtils
> The method freeSpace(String path) returns free disk space in bytes on Windows,
> and returns free disk space in kilobytes (not bytes) on Linux (possibly Unix /
> Mac OS etc. also).  
> The internal method freeSpaceUnix javadoc reads "Find free space on the *nix
> platform using the 'df' command." The value returned by df is read in to a
> variable called bytes and returned. Man pages for df on Linux (Fedora Core 4)
> read "Disk  space  is  shown  in  1K blocks  by  default". So method
> freeSpaceUnix is returning the number of kilobytes free space, not bytes.
> A simple fix could be to add line "bytes = bytes * 1024;" after bytes are read in.
> The javadocs for this class could be improved also. Comment "@return the amount
> of free drive space on the volume" could read "@return the amount of free drive
> space on the volume in bytes".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message