如何在Dart中设置当前工作目录? [英] How to set the current working directory in Dart?
本文介绍了如何在Dart中设置当前工作目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在dart控制台应用程序中,如何设置当前工作目录?
In a dart console application, how do I set the current working directory?
推荐答案
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
这篇关于如何在Dart中设置当前工作目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文