Sandbox.shouldExist

Assert that a file exists in the sandbox

struct Sandbox
const
void
shouldExist
(
string fileName
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Examples

with(immutable Sandbox()) {
    shouldExist("bar.txt").shouldThrow;
    writeFile("bar.txt");
    shouldExist("bar.txt");
}

Meta