collectNotFoundError

Collect a "file not found" error.

alias collectNotFoundError = collectOSError!(errno => errno == core.stdc.errno.ENOENT,
(
code
)
)

Examples

auto fn = deleteme;
if (fn.exists) fn.removeRecurse();
foreach (dg; [
	{ openFile(fn, "rb"); },
	{ mkdir(fn.buildPath("b")); },
	{ hardLink(fn, fn ~ "2"); },
])
	assert(!dg.collectNotFoundError);

Meta