delete method

Future delete ()

Deletes the temp directory for this environment.

This class is no longer valid once the directory is deleted, you must create a new ScratchSpace.

Implementation

Future delete() {
  if (!exists) {
    throw StateError(
        'Tried to delete a ScratchSpace which was already deleted');
  }
  exists = false;
  _digests.clear();
  return tempDir.delete(recursive: true);
}