Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the current working directory in Dart?

In a dart console application, how do I set the current working directory?

like image 939
Kasper Avatar asked Oct 08 '15 15:10

Kasper


Video Answer


1 Answers

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

or just

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

See also https://api.dartlang.org/133671/dart-io/Directory/current.html

like image 158
Günter Zöchbauer Avatar answered Oct 07 '22 04:10

Günter Zöchbauer