[LINK] Inner workings of iTunes

Alastair Rankine arsptr at internode.on.net
Tue Apr 10 14:50:36 AEST 2007


> > iTunes and iPhoto rely on symbolic (or perhaps hard)
> > links on Unix to spin their magic. The links allow
> > multiple instances of files to exist in the file system
> without duplicating the file space. >
> > Unfortunately such links are not available in Windows*
> > and thus to simulate the native Unix behaviour, actual
> > copies are made of multimedia files. A gross waste and a
> very bad deisgn decision, imho. Or, it could just keep a
> record of all the actual locations by path,  without
> creating thousands of symlinks let alone copying actual
> files.

The iTunes Library file format doesn't seem documented
anywhere, but I believe that on MacOS is uses Aliases to
refer to files. (see
http://developer.apple.com/documentation/Carbon/Reference/Alias_Manager/index.html)

These are not symbolic links. You can tell because moving
files around *within an HFS+ file system* will not break the
alias. If it were using symbolic links, such they would
break when moving files around. Similarly if the alias
points to a file on a remote server, it can be mounted
automatically (and recent versions of iTunes support this).

On windows obviously there are not aliases so I believe it
reverts to storing a path to the file, but am willing to be
corrected on this.

On the issue of copy-or-not, this is a user preference. Go
into Preferences > Advanced. Behold the "Copy files into
iTunes Music folder when adding to library" checkbox. It
pretty much does what it says.

Probably the worst you can say about this design is that the
"Copy files..." checkbox is in the wrong place. It probably
should be visible when adding files to the library, although
it's hard to imagine how this could also support
drag'n'drop.



More information about the Link mailing list