parent property

String parent

Get the parent path. If it is a file, the parent folder will be returned.

Implementation

String get parent {
  if (isFile) {
    return File(_path).parent.path;
  } else {
    return Directory(_path).parent.path;
  }
}