[Scons-users] How to identify a Node object as File or Directory type

Gary Oberbrunner garyo at oberbrunner.com
Fri Jun 15 14:53:42 EDT 2012


On Fri, Jun 15, 2012 at 1:48 PM, M Busche <spammymatt94 at yahoo.com> wrote:

>

> OK, so the directory blech does not yet exist, but I was still expecting d.isdir() to return true.  How am I supposed to interrogate d to determine that it is a Dir type Node?


d.isdir() checks on disk, so it won't work for what you want. I don't
think there is a public API for this, but you can look at d.__class__
or use isinstance(d, Dir).

--
Gary


More information about the Scons-users mailing list