如何在Dart中设置当前工作目录?

时间:2015-10-08 15:32:53

标签: dart dart-io working-directory

在dart控制台应用程序中,如何设置当前工作目录?

1 个答案:

答案 0 :(得分:3)

import 'dart:io';
... 
Directory.current = new Directory('your/path/here'); 

或只是

Directory.current = 'your/path/here';

另见https://api.dartlang.org/133671/dart-io/Directory/current.html