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

Add Additional toFiles() and toURLs() Methods to FileUtils

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Do
    • 2.0
    • 3.x
    • Utilities
    • None
    • Java 1.5+

    Description

      I suggest modifying the signatures of the toFiles() and toURLs() to use varargs since that approach will automatically accept arrays and also allow the user to send an arbitrary number of them.

      Convert File[] toFiles(URL[]) to File[] toFiles(URL...)
      Convert URL[] toURLs(File[]) to URL[] toURLs(File...)

      I also suggest adding new methods for converting a collection of URLs or Files to an array, or to a List.

      File[] toFiles(Collection<URL>)
      List<File> toFilesList(URL...)
      List<File> toFilesList(Collection<URL>)

      URL[] toURLs(Collection<File>)
      List<URL> toURLsList(File...)
      List<URL> toURLsList(Collection<File>)

      Attachments

        Activity

          People

            Unassigned Unassigned
            mwooten.dev Michael Wooten
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10h
                10h
                Remaining:
                Remaining Estimate - 10h
                10h
                Logged:
                Time Spent - Not Specified
                Not Specified