• 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
Can't *READ* from my Resources Directory???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't *READ* from my Resources Directory???


  • Subject: Can't *READ* from my Resources Directory???
  • From: Francisco Tolmasky <email@hidden>
  • Date: Wed, 1 Jun 2005 22:13:50 -0700

In the application I'm running I launch a subprocess (NSTask) that uses the standard php tool to preprocess a file in my resources directory. Now, when I was testing, I had it outside and it was working fine, but as soon as I put it in my apps resources directory, php refuses to work. It's very strange, I get something along the lines of this:

Could not open input file: <prints out contents of file>.

Now, if it can't read the file, why can it print out the entire contents of the file? I tried changing the permissions of the file to -rwxrwxrwx and still no luck. Then, I went to the terminal, and just typed out:

> php /users/me/.../myApp/Contents/Resources/that_file.php

AND it worked!

So I don't understand why it refuses to do it (and in a strange manner) when running it from an NSTask. I've heard that one is not supposed to write to the Resources (or anywhere in your app bundle for that matter), but this should just be read, or at most execute?

Thank you for your time,

Francisco Tolmasky
email@hidden
www-scf.usc.edu/~tolmasky


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Can't *READ* from my Resources Directory???
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Custom objects in drag pasteboard?
  • Next by Date: Re: Custom objects in drag pasteboard?
  • Previous by thread: Re: Custom objects in drag pasteboard?
  • Next by thread: Re: Can't *READ* from my Resources Directory???
  • Index(es):
    • Date
    • Thread