changeDirectory static method

bool changeDirectory(
  1. String path
)

Implementation

static bool changeDirectory(String path) {
  try {
    final dir = Directory(path);
    if (!dir.existsSync()) return false;
    Directory.current = dir.path;
    return true;
  } catch (e) {
    stderr.writeln('changeDirectory error: $e');
    return false;
  }
}