You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Created) (JIRA)" <ji...@apache.org> on 2012/04/16 21:40:18 UTC

[jira] [Created] (IO-326) Add or change FileUtils.sizeOfDirectory API that does not overflow

Add or change FileUtils.sizeOfDirectory API that does not overflow
------------------------------------------------------------------

                 Key: IO-326
                 URL: https://issues.apache.org/jira/browse/IO-326
             Project: Commons IO
          Issue Type: New Feature
          Components: Utilities
    Affects Versions: 2.3
            Reporter: Gary D. Gregory


FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.

Counting with a BigInteger will solve this issue. Options:

- Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
- Create a new API to return a BigInteger. What would this new API be called?
-- sizeOfDirectoryAsBigInteger
-- bigIntegerSizeOfDirectory
-- largeSizeOfDirectory
-- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Gary D. Gregory (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory resolved IO-326.
--------------------------------

    Resolution: Fixed

Committed back in April.
                
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>             Fix For: 2.4
>
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Jochen Wiedmann (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256254#comment-13256254 ] 

Jochen Wiedmann commented on IO-326:
------------------------------------

Question: I believe to recall that we have discussed dropping BC for the next version anyways?

If so: Do we really neeed to have sizeOf(dir) and sizeof(dir)AsBigInteger? I'd be in favour of
having the latter only, with a long result.

                
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>             Fix For: 2.4
>
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Gary D. Gregory (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory updated IO-326:
-------------------------------

    Summary: Add new FileUtils.sizeOf[Directory] APIs to return BigInteger  (was: Add or change FileUtils.sizeOfDirectory API such that it does not overflow)
    
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Gary D. Gregory (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256529#comment-13256529 ] 

Gary D. Gregory commented on IO-326:
------------------------------------

See also [IO-327]
                
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>             Fix For: 2.4
>
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Gary D. Gregory (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13256468#comment-13256468 ] 

Gary D. Gregory commented on IO-326:
------------------------------------

If we break BC, then we can just change the return type of the current methods. 
Separately, we can add a org.apache.commons.io.FileUtils.byteCountToDisplaySize(BigInteger) and make the long version call the BigInteger version.
                
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>             Fix For: 2.4
>
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruno P. Kinoshita updated IO-326:
----------------------------------

    Attachment: IO-326.patch

Fixing unused return value of BigInteger.add()
                
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>             Fix For: 2.4
>
>         Attachments: IO-326.patch
>
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (IO-326) Add or change FileUtils.sizeOfDirectory API such that it does not overflow

Posted by "Gary D. Gregory (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory updated IO-326:
-------------------------------

    Summary: Add or change FileUtils.sizeOfDirectory API such that it does not overflow  (was: Add or change FileUtils.sizeOfDirectory API that does not overflow)
    
> Add or change FileUtils.sizeOfDirectory API such that it does not overflow
> --------------------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (IO-326) Add new FileUtils.sizeOf[Directory] APIs to return BigInteger

Posted by "Gary D. Gregory (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory updated IO-326:
-------------------------------

    Fix Version/s: 2.4

Committed first cut as sizeOf[Directory]AsBigInteger
                
> Add new FileUtils.sizeOf[Directory] APIs to return BigInteger
> -------------------------------------------------------------
>
>                 Key: IO-326
>                 URL: https://issues.apache.org/jira/browse/IO-326
>             Project: Commons IO
>          Issue Type: New Feature
>          Components: Utilities
>    Affects Versions: 2.3
>            Reporter: Gary D. Gregory
>             Fix For: 2.4
>
>
> FileUtils.sizeOfDirectory will return a negative number when the size count goes past Long.MAX_VALUE.
> Counting with a BigInteger will solve this issue. Options:
> - Change the signature of FileUtils.sizeOfDirectory() to return a BigInteger. This will obviously break BC.
> - Create a new API to return a BigInteger. What would this new API be called?
> -- sizeOfDirectoryAsBigInteger
> -- bigIntegerSizeOfDirectory
> -- largeSizeOfDirectory
> -- ...?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira