You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michael Wooten (JIRA)" <ji...@apache.org> on 2010/03/04 20:55:27 UTC

[jira] Created: (IO-237) Add Additional toFiles() and toURLs() Methods to FileUtils

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

                 Key: IO-237
                 URL: https://issues.apache.org/jira/browse/IO-237
             Project: Commons IO
          Issue Type: Improvement
          Components: Utilities
    Affects Versions: 2.0
         Environment: Java 1.5+
            Reporter: Michael Wooten
             Fix For: 2.0


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>)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IO-237) Add Additional toFiles() and toURLs() Methods to FileUtils

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

Niall Pemberton updated IO-237:
-------------------------------

    Fix Version/s: 2.x
                       (was: 2.0)

> Add Additional toFiles() and toURLs() Methods to FileUtils
> ----------------------------------------------------------
>
>                 Key: IO-237
>                 URL: https://issues.apache.org/jira/browse/IO-237
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.0
>         Environment: Java 1.5+
>            Reporter: Michael Wooten
>             Fix For: 2.x
>
>         Attachments: path-convert-fileArray-andURLArray-into-varargs.patch
>
>   Original Estimate: 10h
>  Remaining Estimate: 10h
>
> 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>)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IO-237) Add Additional toFiles() and toURLs() Methods to FileUtils

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

Benoit Lafontaine updated IO-237:
---------------------------------

    Attachment: path-convert-fileArray-andURLArray-into-varargs.patch

Add patch

> Add Additional toFiles() and toURLs() Methods to FileUtils
> ----------------------------------------------------------
>
>                 Key: IO-237
>                 URL: https://issues.apache.org/jira/browse/IO-237
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.0
>         Environment: Java 1.5+
>            Reporter: Michael Wooten
>             Fix For: 2.0
>
>         Attachments: path-convert-fileArray-andURLArray-into-varargs.patch
>
>   Original Estimate: 10h
>  Remaining Estimate: 10h
>
> 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>)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.