separate read-file and read-dir protocol requests

From: <basile.starynkevitch_at_nospam.org>
Date: Wed Apr 26 1995 - 00:02:00 PDT

Hello All,

(I'm the guy who on my spare time is very slowly porting the linux
ext2fs to VSTa)

I have a question (and suggestion). Since I'm VSTa-ling (and Linuxing)
at home only and emailing at work, this is from my memory.

Why does reading a file and reading a directory take the same request
(FS_READ, if I remember well)? I believe this is wrong (or at least a
poor choice) because:

1) currently, reading a dir produce a succession of lines, one per
filename. Consequently (as I understand it), a filename can't contain
a newline character (which is permitted by Posix).

2) even on many modern Unixes, there are two different syscalls
(getdents and read) for reading a directory and a plain file

3) most utilities use readdir (or getdents) for reading directories,
so having a separate read-dir request would, in my humble opinion,
almost just need recoding readdir.

4) more interestingly, it would be very difficult to implement a
filesystem where file have both directory and bytestream structures
(like on the MacIntosh OS -forks- or the TRON OS). I believe that such
a feature is highly desirable; for instance, it would make adding
user-level metadata easier (eg an icon for a file would be just the
.ICON direntry, etc). Also, an executable would use such a thing for
symbol tables, etc. Actually, section-structured files (like
ar,tar,cpio,ELF formats on Unixes) would be easier.

Any comments?

-- 
----------------------------------------------------------------------
Basile STARYNKEVITCH   ----  Commissariat a l Energie Atomique
DRN/DMT/SERMA * C.E. Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France
fax: (33) 1- 69.08.85.68; phone: (33) 1- 69.08.40.66; homephone: (33) 1- 46.65.45.53
email: basile.starynkevitch@cea.fr (redirected to basile@soleil.serma.cea.fr);  
----------------------------------------------------------------------
N.B. Any opinions expressed here are solely mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
Please cite a **small pertinent part** of my mail in all answers
Veuillez citer une **petite partie pertinente** de mon courrier dans vos reponses
Received on Fri Apr 28 07:40:02 1995

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:27 PDT