Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-463

FileSystemUtils#freeSpace can be simplified by using new Java 6 File methods

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • 2.16.1
    • None
    • None

    Description

      Commons IO now requires Java 1.6, which has some useful new File methods:

      File.getFreeSpace() / getUsableSpace()

      These could be used to radically simplify (and speed up) the FileSystemUtils freeSpace methods, as well as making it OS-independent.

      The methods should be deprecated in favour of directly calling the File methods directly. Perhaps even deprecate the entire class? - it only contains the freeSpace methods currently.

      Note: a lot of the tests will becorme redundant or need reworking.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: