Re: Meta files for files without new interfaces
On Wed, Jan 23, 2002 at 05:35:38PM +0100, Niels Möller wrote:
> Marcus Brinkmann <brinkmd@master.debian.org> writes:
>
> > You will have to find an extension outside of POSIX. This discussion came
> > up in the Austin group a year ago or so, where some people wanted to have
> > a reserved name space for such data, like ..., or whatever you can think of.
>
> One way might be to attach "/foo" at the end of a name of a *file*. If
> "bar" is a file, POSIX requires that "bar/" should be equivalent to
> "bar",
Wrong. Recent versions of the draft require that "bar/" is equal to "bar/."
(if the last character is a slash, it should behave as if a dot follows the
slash).
> but "bar/foo" is meaningless and trying to use that name will
> just result in some error. Right? So extending POSIX by assigning a
> meaning to such names seems reasonably safe. And we're almost doing
> that already, with nodes that support both file and directory
> operations.
You can do such funky things. I am not sure how well it would word in real
work. And, you can not attach metadata to directories this way :)
BTW, when I said that two slashes are like one, it is true with one
exception. For some strange reason, a pathname that starts with exactly two
(no more, no less) slashes is implementation defined. So you have the whole
//foo/bar namespace... I don't know why this exception was made, probably
for some OS I don't know about. It could be used, but I would be prepared
to fix some scripts etc to not accidentially but a slash too much in the
line.
///foo/bar etc is equivalent to /foo/bar. Same for even more slashes.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann GNU http://www.gnu.org marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de
Reply to: