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