Re: NTFS-like streams?

From: Rogier Wolff (R.E.Wolff@BitWizard.nl)
Date: Sun Aug 13 2000 - 10:00:54 EST


Andrew Pimlott wrote:
> On Sun, Aug 13, 2000 at 10:09:22AM +0200, Rogier Wolff wrote:
> > This may not be "generic" enough for abitrarily named forks. Think of
> > something that IS. It's not all that hard:
> >
> > ~/myfile (data/default fork)
> > ~/.streams/myfile/resource (resource fork)
> > ~/.streams/myfile/Icon (icon fork)
> > ~/.streams/myfile/default (hardlink to ~/myfile )
> >
> > Advantages:
> >
> > - Tar-copyable.
>
> Tar-able, perhaps, but untar-able? onto the same type of filesystem?
> What if tar attempts to extract .streams/myfile/Icon before myfile?

On macs files exist with no data, but only resource forks. You create
them by just writing to the resource fork. Now automagically, an
empty data-fork appears.

Similarly the filesystem needs to recognize the "hidden hardlink"
which has to be ignored!

> Not to mention that if you tar up a directory and send it to a
> friend who un-tars it onto ext2, he's going to get a mess (and
> probably shout at you to stop sending such garbage!).

Now, if those resource forks were actually used for something your
friend simply has all the data. If there are resource-fork-knowledable
programs that access the resource fork as
<dirname>/.streams/myfile/resource, they will simply work.

Of course you don't display empty resource forks. Regrettably, the
user WILL see a ".streams" directory if there are files with non-empty
resources around.

> It's really not feasible to make streams visible to traditional
> utilities.

Trust me, the HFS guys have succeded in getting the filesystem
tar-able and untarable on their filesystem. You really can copy a
filesystem around that way.

You can also untar it onto ext2fs, tar it again, and untar it on HFS
and get a similar filestructure back as you started out with. Of
course, you can break things while they are on ext2. But you can
similarly break things while they are on HFS.

                                        Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
*       Common sense is the collection of                                *
******  prejudices acquired by age eighteen.   -- Albert Einstein ********

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:30 EST