• 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
NSFileManager currentDirectoryPath returning nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFileManager currentDirectoryPath returning nil


  • Subject: NSFileManager currentDirectoryPath returning nil
  • From: Paul Kim <email@hidden>
  • Date: Fri, 26 May 2006 21:05:00 -0400


I'm finding that in one instance, setting NSFileManager's current path via -changeCurrentDirectoryPath: then calling currentDirectoryPath is returning nil. I find this odd as:


- The call to changeCurrentDirectoryPath: returns YES.
- The directory is readable, writable and executable.

Of course, as I was writing this, I realized that in this instance, the parent is not readable. So, is that grounds for currentDirectoryPath to return nil and if so, why does changeCurrentDirectoryPath: return YES? I feel that if I can 'cd' to the directory and even do a 'ls -ld' on it that NSFileManager should be able to as well and that even, if for some reason it can't, that it should return NO to indicate failure.

To work around this, I know I can use absolute paths for NSFileManager operations and, yes, I can also drop down to the POSIX layer but I'd like to know if there's any reason for the above behavior or if I'm missing something.

Thanks,
paul

_______________________________________________
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


  • Prev by Date: Re: Newbie Q : Not-so-simple encoding&decoding example
  • Next by Date: Re: ssl.h linking error
  • Previous by thread: MyDocument and AppController problem
  • Next by thread: Separators in NSPopUpButton via bindings
  • Index(es):
    • Date
    • Thread