创建一个目录

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

创建一个目录

Use the Directory create() method to create a directory. To create intermediate directories, set the recursive argument to true (default is false).

import 'dart:io';

main() async {
  // Creates dir/ and dir/subdir/.
  var directory = await new Directory('dir/subdir').create(recursive: true);
  print(directory.path);
}

Copyright© 2013-2019

京ICP备2023019179号-2