[
https://issues.apache.org/jira/browse/IO-46?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory updated IO-46:
------------------------------
Fix Version/s: (was: 3.x)
Affects Version/s: (was: 1.1)
> [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
> Environment: Operating System: other
> Platform: Other
> Reporter: David Leal
> Priority: Minor
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)