Re: Advice wanted on how to proceed . . .
site_archiver@lists.apple.com Delivered-To: Darwin-kernel@lists.apple.com Hi. I posted a kind of generic question a month or two ago about communication between kernel- and user-space and got some responses which were very helpful. However, before I continue my investigation, I wanted to briefly describe what I'm trying to do and make sure I'm on the right track so I don't waste any time on the wrong approach(es). Very briefly: When you drag a URL from Safari to the Finder it saves the link as a .webloc, which is an empty file with the URL and title of the page in a resource fork. The file's not an empty file, it's just an empty data fork. I find this annoying because it's antiquated and non-portable. Moreover it's already completely portable - In BSD it's referenced as filename/..namedfork/rsrc. I check my bookmarks into Subversion to sync them across different machines, so this doesn't work for me. Have you looked for ._file's? Have you tried including */..namedfork/rsrc ?? I wrote a little utility to walk through a directory tree and replace any .webloc files it finds with .url (Microsoft IE) files, which are simply text files. Since double-click on a .url file on a Mac will open the link in Safari, this has worked just fine for me. What I want to do now is automate the process so that whenever I save a link anywhere in the filesystem, it's automatically converted into a .url file. I'd lookeed into writing a kernel extension that uses the kauth API to be notified whenever a .webloc file is closed, and then notify a user-space process of the location of the file so that it can read it and replace it with a .url file. However, it also seems I could just write a Spotlight importer and not mess with the kernel at all. -- -dhan ------------------------------------------------------------------------ Dan Shoop AIM: iWiring Systems & Networks Architect http://www.ustsvs.com/ shoop@iwiring.net http://www.iwiring.net/ 1-714-363-1174 pgp key fingerprint: FAC0 9434 B5A5 24A8 D0AF 12B1 7840 3BE7 3736 DE0B iWiring provides systems and networks support for Mac OS X, unix, and Open Source application technologies at affordable rates. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... At 1:31 PM -0400 7/4/06, Bruce Fancher wrote: You find this annoying b/c you don't realize a Macintosh file is defined as having a mandatory two streams (forks) of data, either of which may be zero length. That is the information *is* stored in the file. It's stored in one of three forks you commonly see under Tiger, two of which *always* exist if it's a Macintosh file. - If the file is copied from HFS+ to elsewhere it is copied as a Apple Double, which is also completely portable Then subversion is broken in that it does not read/write Macintosh files. It discards necessary data and metadata that is meant to be preserved. This should be split as an Apple Double on foreign machines. Nice solution, I suppose. But why not just store them on a non-HFS+ volume and they'll properly split into Apple Doubles. Or just use SplitForks. Seems like a lot of trouble when the more proper solution already exists. Namely maintain the fork like you should be. This email sent to site_archiver@lists.apple.com
participants (1)
-
Dan Shoop