Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: dirent->d_type: DT_LNK oddness ?



Ignore this - the perf hit on calling readlink is pretty small, even if
I call it on every file in the directory.

Still interested in why I'm seeing this, but not for resolving the issue
I (was) banging my head over.

> -----Original Message----- 
> Hiya -
> 
> Playing with BSD File routines & it seems that *every* file I 
> retrieve info on via readdir that isn't a directory or a 
> pipe/fifo has "DT_LNK"
> set. 
> 
> I would have thought that this should only be set for 
> symbolic links (cannot be sure, since sys/dirent.h doesn't 
> elaborate on the enums listed, and I can find nothing on this 
> via google.
> 
> Should I maybe be using something other than readdir to grab 
> the contents of a directory ? At this point I'm looking for 
> file name, and the type of stuff that (I thought) was 
> included in dirent's d_type (whether something is a 
> directory, pipe, link or 'regular' file).
> 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.