Sandbox.writeFile

Write a file to the sanbox

  1. void writeFile(string fileName, string output)
  2. void writeFile(string fileName, string[] lines)
    struct Sandbox
    const
    void
    writeFile
    (
    in string fileName
    ,
    in string[] lines
    )

Examples

import std.file;
import std.path;

with(immutable Sandbox()) {
    assert(!buildPath(testPath, "foo.txt").exists);
    writeFile("foo.txt");
    assert(buildPath(testPath, "foo.txt").exists);
}

Meta