4

I'm trying to get the full path of a TFENode in OSX Lion, but am unable to get a result using the old way (by converting to an FINode and getting the fullPath - the method

[[FINode nodeWithFENode:myTFENode] fullPath]

doesn't seem to work for Lion anymore. Is there a way to do this?

maranas
  • 1,396
  • 1
  • 12
  • 21

1 Answers1

5

From a TFENode, you can get an OpaqueNodeRef, and use that with FINode's nodeFromNodeRef: method. After that, you can get the NSURL to the item with FINode's previewItemURL method.

maranas
  • 1,396
  • 1
  • 12
  • 21
  • I can't find the nodeFromNodeRef: method anywhere... where can i find the header information about it? – Orbitus007 Feb 21 '13 at 15:29
  • @Orbitus007: It's not anywhere as it isn't documented. You have to generate the header information by class-dumping finder – maranas Feb 23 '13 at 18:08
  • I found the class TFENode in another repository https://github.com/infinitelabs/FinderMenu.git. You can't dump this information from the finder... someone generated a helper class called TFENode – Orbitus007 Feb 27 '13 at 18:05
  • @Orbitus007: you HAVE to get the information from Finder, either by class-dumping or by manually debugging, as this isn't in any API. The guy whose repo you linked to probably got the TFENode definitions from Finder by class-dumping it. see: http://stevenygard.com/projects/class-dump/ – maranas Mar 02 '13 at 21:46