remove

Delete file name.

  1. void remove(R name)
  2. void remove(R name)
    void
    remove
    (
    R
    )
    (
    auto ref R name
    )

Parameters

name R

string or range of characters representing the file name

Throws

FileException on error.

Examples

import std.exception : assertThrown;

deleteme.write("Hello");
assert(deleteme.readText == "Hello");

deleteme.remove;
assertThrown!FileException(deleteme.readText);

Meta