• 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: file example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file example


  • Subject: Re: file example
  • From: Kurt Revis <email@hidden>
  • Date: Fri, 15 Feb 2002 06:42:38 -0800

To answer your original question:

Can anyone point me to an example of loading a file in a document-based app
with loadDataRepresentationOfType: or the like where I can get the file's
URL once it's loaded?

It doesn't look like you can directly get a URL for the file. However, you can get the file name and then easily make a URL out of it.

NSDocument *document;
NSURL *url;

url = [NSURL fileURLWithPath:[document fileName]];

This should work but I haven't tried it...

--
Kurt Revis
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: file example (From: Darin Duphorne <email@hidden>)

  • Prev by Date: Re: file example
  • Next by Date: Is there a formatter sample?
  • Previous by thread: Re: file example
  • Next by thread: Is there a formatter sample?
  • Index(es):
    • Date
    • Thread