Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.wizards Subject: Dot files always first in directory? Message-ID: <11108@bloom-beacon.MIT.EDU> Date: 4 May 89 13:31:57 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 19 It it safe to assume when writing a program which manipulates directories that . and .. will always be the first two entries in a directory? If I can't assume that, then I've got to compare every file in the directory to "." and "..", and this would probably slow the program down even more than it already is. As it is now, I'm just doing readdir(dirp); readdir(dirp); /* get rid of . and .. */ in my code right after the opendir(). Is this valid? Jonathan Kamens USnail: MIT Project Athena 410 Memorial Drive, No. 223F jik@Athena.MIT.EDU Cambridge, MA 02139-4318 Office: 617-253-4261 Home: 617-225-8218