file access

Steven Kramer smk at axiom.UUCP
Thu Jan 19 07:26:57 AEST 1984


I think you're missing something.  If you can read the directory
as a whole or name by name, you are obtaining the SAME information.
If protection of the directory disallows reading, you cannot read
anything on either method.  (I assume on the name by name system
call basis you will also get the inode number, which makes both
methods eqivalent.)  In fact, the opendir(), ... 4.2BSD (compatible)
library routines do EXACTLY what you want, but alas, the protection
is exactly the same on either method.

So, directly, UNIX gives you the `raw' directory file to look at,
and you can build routines around the structure to make your life
easier.  That's the UNIX way.  (I know by saying things like this
last statement I'll get a rebuttal.  For this article, I'll only
take rebuttals from North Dakota [is there one?] -- the rest of you
flame to /dev/null.)
-- 
	--steve kramer
	{allegra,genrad,ihnp4,utzoo,philabs,uw-beaver}!linus!axiom!smk	(UUCP)
	linus!axiom!smk at mitre-bedford					(MIL)



More information about the Comp.unix.wizards mailing list