createDirectory static method

Future<Directory> createDirectory(
  1. String key
)

Implementation

static Future<Directory> createDirectory(String key) async {
  final baseDir = await getTemporaryDirectory();
  final path = p.join(baseDir.path, key);

  const fs = LocalFileSystem();
  final directory = fs.directory(path);
  await directory.create(recursive: true);
  return directory;
}