How can I get the POSIX path in the Finder window, which is now at the top of the window list? Preferably with some kind of Cocoa structure, but I'm open to anything.
Background: I will need this because I want to make a selection of files matching the regular expression pattern that will start recursively from this path. The idea is to use
[[NSWorkspace sharedWorkspace] subpathsAtPath:thePath]
to get all the descendants of this path, use "grep" in NSTask (not to pack the regular expression support framework) and use
[[NSWorkspace sharedWorkspace] selectFile:aFile inFileViewerRootedAtPath:thePath]
in a loop passing through NSArray from the records returned by grep.
So far I have covered NSWorkspace, NSFileManager, and NSApplication and other keyword searches in the Xcode documentation.
Thanks for finding out my question!
Andre
PS: grep, , RegexKit Lite ...