• 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
Distinguish between Directory and File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distinguish between Directory and File


  • Subject: Distinguish between Directory and File
  • From: Dani <email@hidden>
  • Date: Wed, 3 Oct 2007 21:23:51 +0200

Hi! I've been trying to write some code to distinguish between a directory and a file. At first I tried with fileExistsAtPath:isDirectory method thinking that looking at the value of isDirectory will told me what I need. I was wrong.
Then after some reading about UNIX I tried to do it using Shell Scripting but with no success.
So, what I want to know if there's any way to do that and if not, how can I get the file permissions with objective-c, so then I could distinguish between file and directories thanks to the first character in the permissions string: "d"rwxrwxrwx


Thanks
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Distinguish between Directory and File
      • From: Ben Stiglitz <email@hidden>
  • Prev by Date: Re: Image + Text NSCell subclass
  • Next by Date: Re: Should I be trying to use bindings for this?
  • Previous by thread: Re: Image + Text NSCell subclass
  • Next by thread: Re: Distinguish between Directory and File
  • Index(es):
    • Date
    • Thread