commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (IO-46) [io] Find file in classpath
Date Thu, 13 Jul 2006 03:26:31 GMT
     [ http://issues.apache.org/jira/browse/IO-46?page=all ]

Henri Yandell updated IO-46:
----------------------------

    Bugzilla Id:   (was: 38523)
    Fix Version: 1.3

Decide whether or not to take this by release of 1.3.

> [io] Find file in classpath
> ---------------------------
>
>          Key: IO-46
>          URL: http://issues.apache.org/jira/browse/IO-46
>      Project: Commons IO
>         Type: Improvement

>     Versions: 1.1
>  Environment: Operating System: other
> Platform: Other
>     Reporter: David Leal
>     Priority: Minor
>      Fix For: 1.3

>
> 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.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message