Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!rochester!pt.cs.cmu.edu!o.gp.cs.cmu.edu!andrew.cmu.edu!rh2y+ From: rh2y+@andrew.cmu.edu (Russell E. Hoffman, II) Newsgroups: comp.os.os9 Subject: Re: directory help Message-ID: Date: 18 Dec 90 02:59:38 GMT Organization: Carnegie Mellon, Pittsburgh, PA Lines: 23 Thanks to those of you who replied. It turns out that (after doing an #include ) the error returned by _gs_gfd was 000:201 - Invalid path number. Further investigation revealed that this was caused by the fact that when you attempt to open a directory using open (file,00), it returns a -1 as the path, indicating an error of sorts. Now here's my real question, after having resolved this. There's GOT to be a faster way to get the file descriptors for every file in a given directory than simply opening each file individually then doing a _gs_gfd() on the individual files. I have thought about reading all the directory entries, storing the addresses of each of their FDs in an array and then opening the physical device (/h0@ or whatever) and grabbing the FDs all at once, thereny saving a LOT of seek time on the disk, but the problem is, as Mr. Larson pointed out, you can only run such a program if you are the superuser, which kind of defeats the whole purpose. There simply has to be yet some other way, because when I do a 'dir -e', it takes about one-fifth the amount of time it takes my program to accomplish the same thing. Any hints/suggestions? Thanks in advance, Russell Hoffman rh2y+@andrew.cmu.edu Carnegie Mellon Univ.