mapping files to objects
Tue, 06 May 1997 11:40:11 -0500
Content-Type: text/plain; charset=us-ascii
In the interest of getting something that is (a) implementable on top of the
Unix file system and (b) has semantics that can be expanded to The Right
Thing (tm) later, I'd like to make a modest proposal (no, we aren't going to
eat our young).
1) Let's take the CL path objects and add the notion of a file type to the
object. This file type would *not* appear in the printed representation of
the path, but would instead by set and read by accessor functions. This type
could then be mapped into a MIME type or a MacOS style owner/type pair.
Initially, I thought it should be a MIME type, but then my stupidity passed
and I realized that it should be a CLOS class. *duh*. This class would have
a method for determining the MIME type or any other foreign typing system
2) Since a Unix file system doesn't have these semantics in it, let's define a
facility which allows one to define mappings between Unix paths and the above
defined classes. A similar facility should be defined between MIME types and
lisp-source-code and mbox are probably built on text-file with additional
methods for handling lisp source and the broken Unix mailfile format.
3) It now becomes nearly trivial to write the function that I previously
proposed to map from a pathname to an object representing that file.
4) When/if we write our own file system, this can be implemented natively so
that all files would have a class associated with them. Our file system
wouldn't need real extensions so we'd do away with that baggage, but it should
still support some form of soft deletion and versioning.
5) Even if we never develop a working Object-Oriented store, we're already
well ahead of the rest of the universe in our file type information (and, most
importantly, it gives me the hooks that I want to start writing a
well-integrated mail system).
Chris Garrigues O- cwg@DeepEddy.Com
Deep Eddy Internet Consulting +1 512 432 4046
609 Deep Eddy Avenue
Austin, TX 78703-4513 http://www.DeepEddy.Com/~cwg/
-----BEGIN PGP MESSAGE-----
-----END PGP MESSAGE-----