createTempDir function

String createTempDir(
  1. String base, [
  2. String? prefix
])

Creates a temp directory in base, whose name will be prefix with characters appended to it to make a unique name.

Returns the path of the created directory.

Implementation

String createTempDir(String base, [String? prefix]) =>
    Directory(base).createTempSync(prefix).path;