7

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

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
Kasper
  • 12,594
  • 12
  • 41
  • 63

1 Answers1

9
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

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567