| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | RE: struct dirent doesn't contain d_namlen and d_type fields. |
| Date: | Fri, 22 Apr 2005 12:23:54 +0100 |
| MIME-Version: | 1.0 |
| In-Reply-To: | <OFE6B9E72E.F7C4AE4D-ON80256FEB.003CA588-80256FEB.003DEC06@test.alstom.com> |
| Message-ID: | <SERRANOFji4ZvBOOOaB000000cc@SERRANO.CAM.ARTIMI.COM> |
| X-OriginalArrivalTime: | 22 Apr 2005 11:23:58.0551 (UTC) FILETIME=[C6DEAE70:01C5472D] |
----Original Message----
>From: thomas.revell
>Sent: 22 April 2005 12:09
> Does anyone know how I can simulate the d_type field? Or if it's even
> relevant in Cygwin at all?
>
> Any advice will be much appreciated.
>
> Regards,
>
> Thomas Revell
The posix standard says the only thing you can *absolutely* rely on to be
there is the d_name field, even the d_ino is an XSI extension.
http://www.opengroup.org/onlinepubs/009695399/basedefs/dirent.h.html
If you want to know the type of a file, you have to stat (...) it.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |