directory property

String get directory

Gets the directory path from the full path.

Implementation

String get directory {
  final parts = path.split('/');
  if (parts.length <= 1) return '';
  return parts.sublist(0, parts.length - 1).join('/');
}