rootOf method

Future<Directory> rootOf(
  1. String path
)

Implementation

Future<Directory> rootOf(String path) async {
  final root = await fs.directory(path).getRoot();

  if (root == null) {
    // TODO(mrgnhnt): throw a custom exception
    throw Exception('Failed to find root of project');
  }

  return root;
}