• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Deprecated function - not clarified
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Deprecated function - not clarified (From: Erwin <email@hidden>)

  • Prev by Date: RE: Deprecated function - not clarified
  • Next by Date: Re: Deprecated function - not clarified
  • Previous by thread: Deprecated function - not clarified
  • Next by thread: Re: Deprecated function - not clarified
  • Index(es):
    • Date
    • Thread