[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFE: stat(1) flag for learning the d_type value of a given file
From: |
Mike Frysinger |
Subject: |
Re: RFE: stat(1) flag for learning the d_type value of a given file |
Date: |
Wed, 22 Oct 2014 15:50:02 -0400 |
On 13 Oct 2014 14:34, Eric Blake wrote:
> On 10/13/2014 02:14 PM, Pádraig Brady wrote:
> > Maybe, though coreutils' tests also check d_type is available.
> > Would this suffice for cygwin?
> >
> > http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=tests/d_type-check;hb=HEAD
>
> That seems like a useful starting point for a hack, but it's a bit too
> platform-specific (libc = ctypes.cdll.LoadLibrary("libc.so.6") has no
> chance on Cygwin
it also doesn't hold true for all Linux/glibc platforms, let alone
Linux/non-glibc. if you were to leverage ctypes.util.find_library however,
you'd have a much better chance ...
libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
-mike
signature.asc
Description: Digital signature