【问题标题】:How to set the current working directory in Dart?如何在 Dart 中设置当前工作目录?
【发布时间】:2016-01-06 07:56:45
【问题描述】:

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

【问题讨论】:

    标签: dart dart-io working-directory


    【解决方案1】:
    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

    猜你喜欢
    • 1970-01-01
    • 2010-12-21
    • 1970-01-01
    • 2013-02-26
    • 2020-02-24
    • 2011-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多