You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2007/10/24 18:09:51 UTC
[jira] Updated: (IO-46) [io] Find file in classpath
[ https://issues.apache.org/jira/browse/IO-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-46:
------------------------------
Fix Version/s: (was: 1.4)
AFTER-1.4
> [io] Find file in classpath
> ---------------------------
>
> Key: IO-46
> URL: https://issues.apache.org/jira/browse/IO-46
> Project: Commons IO
> Issue Type: Improvement
> Components: Utilities
> Affects Versions: 1.1
> Environment: Operating System: other
> Platform: Other
> Reporter: David Leal
> Priority: Minor
> Fix For: AFTER-1.4
>
>
> Just to suggest adding a method like this:
> public File findFileInClasspath(String fileName) throws FileNotFoundException
> {
> URL url = getClass().getClassLoader().getResource(fileName);
> if (url == null){
> throw new FileNotFoundException(fileName);
> }
> return new File(url.getFile());
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.