directoryWindows static method

Future<Directory> directoryWindows()

Provides the UpdateCenter directory in the system's downloads directory for Windows. Creates the directory if it doesn't exist.

Implementation

static Future<Directory> directoryWindows() async {
  Directory? tempDir = await getDownloadsDirectory();
  Directory updateDirectory = Directory('${tempDir?.path}/Update Center/');

  if (!await updateDirectory.exists()) {
    await updateDirectory.create(recursive: true);
  }
  return updateDirectory;
}