• 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 'attributesOfItemAtPath:error:' does not traverse a link?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFileManager 'attributesOfItemAtPath:error:' does not traverse a link?


  • Subject: NSFileManager 'attributesOfItemAtPath:error:' does not traverse a link?
  • From: Tito Ciuro <email@hidden>
  • Date: Fri, 28 May 2010 17:01:55 +0200

Hello,

I'm trying to replace the following deprecated NSFileManager method:

> /* attributesOfItemAtPath:error: returns an NSDictionary of key/value pairs containing the attributes of the item (file, directory, symlink, etc.) at the path in question. If this method returns 'nil', an NSError will be returned by reference in the 'error' parameter. This method does not traverse a terminal symlink.
>
>     This method replaces fileAttributesAtPath:traverseLink:.
>  */
> - (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error;


The old statement traverses the link:

	NSDictionary* attr = [[NSFileManager defaultManager] fileAttributesAtPath:file traverseLink:YES];

The problem is that the header states that 'attributesOfItemAtPath:error:' that it's a replacement for 'fileAttributesAtPath:traverseLink:', but provides no provision for traversing the link.

How would I obtain the attributes of an item that needs to be traversed first?

Thanks,

-- Tito
_______________________________________________

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: NSFileManager 'attributesOfItemAtPath:error:' does not traverse a link?
      • From: Charles Srstka <email@hidden>
  • Prev by Date: Re: Where is zlib located?
  • Next by Date: Re: six things I wasn't able to do with Cocoa
  • Previous by thread: Re: Notification of file system modification arrives too early?
  • Next by thread: Re: NSFileManager 'attributesOfItemAtPath:error:' does not traverse a link?
  • Index(es):
    • Date
    • Thread