创建一个临时文件夹

Android社区 收藏文章

Use the Directory createTemp() method to create a temporary directory. This method appends random characters to the name of the directory to produce a unique directory name.

import 'dart:io';

main() async {
  var directory = await Directory.systemTemp.createTemp('my_temp_dir');
  print(directory.path);
}
相关标签

扫一扫

在手机上阅读