parentPath function

String parentPath(
  1. String path
)

Implementation

String parentPath(String path) {
  var pathLevels = path.split('/');
  pathLevels.removeLast();
  return pathLevels.join('/');
}