On Sat, 29 Apr 2006 14:50:46 +0200 Joerg Schilling wrote:
> Roland Mainz <roland.mainz at nrubsig.org> wrote:
> > > IIRC, Cygwwin implements: file:substream
> >
> > Is that implemented in the shell or in the Cygwwin libc emulation itself
> > ?
> I don't know, it may be a MS feature or a Cygwin feature.
> > > This could in theory implemented in a compatible way.
> >
> > I think a better alternative may be to do something like the POSIX (was
> > thet really POSIX or something else ?) version number scheme, e.g. file
> > "xyz" with versions 1, 2 and 9 can be accessed via "xyz;1", "xyz;2" and
> > "xyz;9"... substreams could then be addressed via
> > "xyz;name_of_xattrfile" ...
> But then you would not be able to tell whether "xyz;name_of_xattrfile"
> would be a file name or referencing a substream.
> Note that ';' is a valid character for filenames on Solaris.
it was digital vms and it was an abomination
any filesystem extensions should follow time honored pathname and
pathname system call syntax/semantics so that the only things that
need to change are the internals of the pathname file system call
implementations
we (dgk gsf kpv) did this in the 3d filesystem
regular file paths followed by '/' access the 3d attributes for the regular file
the namespace is essentially unencumbered after the '/'
3d directories only have one attribute (the covered directory)
so we hijacked the special file name '...' for the 3d directory attribute
the upshot is that 99.99% of unix commands work with 3d without modification
no added options, no added system calls
the one exception was cp(1) detecting file overwrite
ls(1) and find(1) traverse the attributes
chmod(1) chmod(2) handle attribute permissions
3d also has a versioning component (not used daily, 3d layering is used
all the time) that is a supereset of vms versions that incorporates
compression and deltas
t.c the latest version of t.c
t.c/... t.c in the next lower view
t.c/ the version attribute directory for t.c
t.c/latest the latest t.c -- explicit
t.c/1.2.3 version 1.2.3 of t.c
I don't know the details of the xattrs but from this thread it
looks like they are regular file names -- hopefully with data
that can be accessed by read(2)/write(2)
if directories can have attributes then just steal one file name
to be the attribute directory for any path, say "$", or "...."
or "#" (something that doesn't need shell quoting)
ls path/$ list all attributes for path
cat path/$/foo cat the foo attribute for path
you may think the /$/ is ugly, but its not nearly as ugly
as recoding how many commands with additional options and parallel
universe system calls -- if we wanted that we could join microsoft
(i.e., a different set of open/close/read/write calls for each file type)
-- Glenn Fowler -- AT&T Research, Florham Park NJ --