From: Marko Schulz Date: 2002-03-20T02:58:30+09:00 Subject: Re: dots in Dir.entries On Wed, Mar 20, 2002 at 01:42:34AM +0900, Garance A Drosihn wrote: > > No. It is impossible. You can't just add 2 for '.' and '..', > because the current directory may not have those (it depends > on what kind of filesystem you are using). But your usage of . and .. as a trick to speed up finding subdirectories is even more dependent on the filesystem. Heck, not every filesystem even has a link-count. So if you _really_ want to do this trick and make it as independent of the filesystem as possible, there still is a way: stat . and .. blindly. If they (or stat itself) are not there you get an error you have to catch. Otherwise you are able to use this information and do your speed optimization. -- marko schulz