develooper Front page | perl.macosx | Postings from October 2007

Re: Parsing alias data. Can Mac::Fileshelp?

Thread Previous | Thread Next
James Reynolds
October 24, 2007 12:43
Re: Parsing alias data. Can Mac::Fileshelp?
Message ID:
>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 
>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)?

Years ago I hacked together a Carbon/Foundation c thingy that figures 
out alias data.

It creates the plist info that goes in the dock prefs.  The alias 
data is part of the output.  You could hack the code so that it only 
prints alias data, or parse the output.  I keep wanting to make it 
more useful but I hate c.  I would love to be able to do this in Perl 

I have no idea if using an external utility like this will work for 
you.  Let me know either way.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About