[
https://issues.apache.org/jira/browse/IO-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567121#action_12567121
]
Jukka Zitting commented on IO-46:
---------------------------------
What's the use case for this feature?
> [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: 2.x
>
>
> 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.