path property

String get path

Returns the path as a string.

See pathSegments for getting the path as a list of its segments.

Implementation

String get path {
  final buffer = StringBuffer();
  if (isAbsolute) {
    buffer.write('/');
  }
  buffer.writeAll(pathSegments, '/');
  if (isDirectory && pathSegments.isNotEmpty) {
    buffer.write('/');
  }
  return buffer.toString();
}