At 23:40 +0900 10/24/07, Gavin Brock wrote: >I've written some code to handle relocating of user home folders, in >particular, the rewriting of full paths in preference files. For the majority >of applications, this all works sweetly with Foundation.pm and the usual >NSDictionary calls. > >However I am running into issues with the Finder sidebar. The "useritems" in >the sidebar plist are based on "aliases" - with no POSIX file paths at all >(like Dock has). > >I gather this is all Carbon magic, and I have been wandering round the >Macperl docs without much success. I'm guessing that Mac::Files might be the >right area. > >Does anyone know what calls I could use to parse and edit the alias data >(which I currently have extracted into temp files)?
AppleScript? It does have a "POSIX path of" command which can be applied to a Finder alias. There is the osascript tool which is a bit easier to use than Apple's script editor. The AppleScript dictionary in Finder has been improved a whole lot and might contain classes and methods for sidebar items. -- Applescript syntax is like English spelling: Roughly, though not thoroughly, thought through.