digitalmars.D.learn - using pipeprocess on non-applications
- Sean Campbell (3/3) Jul 26 2014 is there any way to detect if a file is a binary executable that
- John Colvin (8/11) Jul 27 2014 pipeProcess will throw a ProcessException if it can't start an
is there any way to detect if a file is a binary executable that is cross platform or a way to detect whether pipeprocss failed to execute a file if it wasn't executable.
Jul 26 2014
On Saturday, 26 July 2014 at 15:24:01 UTC, Sean Campbell wrote:is there any way to detect if a file is a binary executable that is cross platform or a way to detect whether pipeprocss failed to execute a file if it wasn't executable.pipeProcess will throw a ProcessException if it can't start an executable. Checking the type of a file, permissions, availability of necessary shared libraries etc. can be checked with a variety of unix tools (file, ldd, stat). There are c functions for accessing this information which you can import from core.stdc Don't know about Windows but I presume the same applies.
Jul 27 2014