Max*_*xpm 3 documentation d standard-library phobos
std.process有一个很好的shell()功能.
import std.process;
import std.stdio;
void main()
{
string Output = shell("ls .");
writeln("The contents of this directory are:");
write(Output);
}
Run Code Online (Sandbox Code Playgroud)
它在Phobos源中有记录,但不在线.这让我在实际代码中使用它有点犹豫.它是实验性的还是不稳定的,还是在线文档落后?
| 归档时间: |
|
| 查看次数: |
94 次 |
| 最近记录: |