3

std.process has a nice shell() function.

import std.process;
import std.stdio;

void main()
{
    string Output = shell("ls .");
    writeln("The contents of this directory are:");
    write(Output);
}

It is documented in the Phobos source, but not online. This makes me a little hesitant to use it in real code. Is it experimental and unstable, or are the online docs just falling behind?

1 Answer 1

5

The problem is the documentation generation. You can safely use that function, it's not going away.

I'll file this bug.

1
  • Fixed for the next release (dmd 2.057). Commented Dec 11, 2011 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.