You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gabriele Kahlout (JIRA)" <ji...@apache.org> on 2011/02/09 17:03:57 UTC
[jira] Created: (IO-261) getFile with varargs parameter
getFile with varargs parameter
------------------------------
Key: IO-261
URL: https://issues.apache.org/jira/browse/IO-261
Project: Commons IO
Issue Type: Improvement
Reporter: Gabriele Kahlout
Priority: Minor
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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (IO-261) Add FileUtils.getFile API with varargs
parameter
Posted by "Gary D. Gregory (Closed) (JIRA)" <ji...@apache.org>.
[ 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
[jira] Resolved: (IO-261) getFile with varargs parameter
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved IO-261.
--------------------------------
Resolution: Fixed
Fix Version/s: 2.1
Assignee: Niall Pemberton
Fixed thanks
http://svn.apache.org/viewvc?view=revision&revision=1081025
> getFile 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (IO-261) Add FileUtils.getFile API with varargs
parameter
Posted by "Gary D. Gregory (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated IO-261:
-------------------------------
Summary: Add FileUtils.getFile API with varargs parameter (was: getFile with varargs parameter)
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira