创建一个临时文件夹

2056次阅读  |  发布于5年以前

创建一个临时文件夹

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);
}

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8