Re: Deprecated function - not clarified
Re: Deprecated function - not clarified
- Subject: Re: Deprecated function - not clarified
- From: Jean-François Veillette <email@hidden>
- Date: Tue, 9 Nov 2004 11:49:06 -0500
If you know it's a file in the file system, then you can do :
URL resourceUrl = rm.pathURLForResourceNamed(...);
resourcePath = resourceUrl.url.getPath();
if your not sure, you can check the protocol first :
String protocol = resourceUrl.getProtocol();
if("file".equals(protocol)) {
...
}
- jfv
Le 04-11-09, à 11:42, Erwin a écrit :
Resource Manager method 'pathForResourceNamed' is indcated as
deprecated in all documentation
but is still used a lot in WO (read an article in Stepwise - 2004
about Aspect object)
if we should not write the following statement :
String resourcePath = (String)rm.pathForResourceNamed( filename,
framework, null );
how could it be replaced using 'inputStreamForResourceNamed' to get a
resourcePath ?
InputStream resourceStream = (InputStream)
rm.inputStreamForResourcedNamed( filename, framework, null );
how cn I get a File object to get its path ?
thanks
Erwin _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden