removeIfExists

Variant of std.file.remove() that returns status instead of throwing.

Modified copy of std.file.remove().

@safe @trusted nothrow @nogc
bool
removeIfExists
(
scope const(char)[] name
)

Return Value

Type: bool

true iff file of path name was successfully removed, false otherwise.

Typically used in contexts where a nothrow variant of std.file.remove() is require such as in class destructors/finalizers in which an illegal memory operation exception otherwise file be thrown.

Meta