FileMapping.discard

Deletes the underlying file and frees all resources associated. Reinitializes this as a fresh object that can be reused.

This function does not abort if the file cannot be deleted, but does print a message on stderr and returns false to the caller. The underlying rationale is to give the caller the option to continue execution if deleting the file is not important.

struct FileMapping(Datum)
nothrow
static if(!is(Datum == const))
bool
discard
()

Return Value

Type: bool

true iff the file was successfully deleted. If the file was not deleted, prints a message to stderr and returns false.

Meta