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 (Closed) (JIRA)" <ji...@apache.org> on 2011/10/10 17:49:30 UTC
[jira] [Closed] (IO-261) Add FileUtils.getFile API with varargs
parameter
[ https://issues.apache.org/jira/browse/IO-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory closed IO-261.
------------------------------
Closing, we released version 2.1.
> Add FileUtils.getFile API with varargs parameter
> ------------------------------------------------
>
> Key: IO-261
> URL: https://issues.apache.org/jira/browse/IO-261
> Project: Commons IO
> Issue Type: Improvement
> Reporter: Gabriele Kahlout
> Assignee: Niall Pemberton
> Priority: Minor
> Labels: features
> Fix For: 2.1
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Why not have those in FileUtils?
> public static File getFile(final String... dirs) {
> File ret = null;
> for (String dir : dirs) {
> if (ret == null) {
> ret = new File(dir);
> } else {
> ret = new File(ret.getPath(), dir);
> }
> }
> return ret;
> }
> public static File getFile(final File dir, final String... dirs) {
> File ret = dir;
> for (String dir1 : dirs) {
> if (ret == null) {
> ret = new File(dir1);
> } else {
> ret = new File(ret.getPath(), dir1);
> }
> }
> return ret;
> }
--
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