directory method

String directory({
  1. String? fromDirectory,
})

Implementation

String directory({String? fromDirectory}) {
  final dir = path.dirname(pubspecYaml);

  if (fromDirectory == null) {
    return dir;
  }

  return path.relative(dir, from: fromDirectory);
}