Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!lll-winken!sun-barr!ccut!wnoc-tyo-news!sranha!srava!erik From: erik@sra.co.jp (Erik M. van der Poel) Newsgroups: comp.unix.wizards Subject: file attributes Message-ID: <1743@sranha.sra.co.jp> Date: 20 Jun 91 00:14:41 GMT Sender: news@sranha.sra.co.jp Organization: Software Research Associates, Inc., Japan Lines: 39 Nntp-Posting-Host: srava Originator: erik@srava On the Macintosh, it is possible to double click on the icon that represents a file to invoke the application associated with that file. It is difficult to build a GUI (graphical user interface) to do the same for Unix systems, since Unix does not offer a standard way of attaching an application name to a file. It is almost possible to create a Mac-like interface on Unix, but this involves incredibly convoluted methods such as keying off of the name of the file, or checking the contents of the file for certain known properties of an application's files. Again, there are no standards in this area. Unix needs to be extended to allow attaching all sorts of attributes to files. The inode is not extensible. The attributes could be stored within the file itself, for example at the beginning. However, this would upset lots of programs that assume that the file is the data itself, just a stream of bytes, with no standard attributes attached. So we need a new system call, say, mopen(), which opens a file that contains attributes such as the application name. This would allow old programs to continue to use open() to access the data itself. The stat() call would also be left unchanged. The size of the attributes file could be determined by calling fstat() on the file descriptor returned by mopen(). This means that we need two inode structures to be associated with each file. This could be implemented by assigning two adjacent inodes to each file. E.g. the odd one always points to the data itself, while the even one points to the attributes. In order to make good use of such an attributes file, however, we need to standardize its contents. We could use object identifiers that are registered internationally for this purpose. Comments? - -- Erik M. van der Poel erik@sra.co.jp Software Research Associates, Inc., Tokyo, Japan TEL +81-3-3234-2692