I have just redone the interface of my std.process proposal, and I am very pleased with the result.

Calling "ls -l" is now as simple as writing

   spawnProcess("ls -l");

while "ls -l | grep foobar > filesNamedFoobar.txt" isn't that big of a deal either:

    auto pipe = Pipe.create();
    auto file = File("filesNamedFoobar.txt", "w");

    auto lsPid = spawnProcess("ls -l", stdin, pipe.writeEnd);
    scope(exit) lsPid.wait();

    auto grPid = spawnProcess("grep foobar", pipe.readEnd, file);
    scope(exit) grPid.wait();

The documentation is also a lot better now (though the spawnProcess() signature looks horrible, but that's a DDoc issue). As always, please check out

    http://github.com/kyllingstad/ltk/blob/master/ltk/process.d
    http://kyllingen.net/code/ltk/doc/process.html

and give me your opinions.

-Lars


--
Lars Tandle Kyllingstad
@: [email protected]
#: 40233221
w: http://www.kyllingen.net
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to