commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (IO-46) [io] Find file in classpath
Date Wed, 24 Oct 2007 16:09:51 GMT

     [ 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.


Mime
View raw message