listDirectory method

  1. @override
Future<List<FileSystemEntity>> listDirectory(
  1. String path
)
override

Lists the contents of the directory at the given path.

Implementation

@override
Future<List<FileSystemEntity>> listDirectory(String path) async {
  final dirPath = resolvePath(path);
  final dir = Directory(dirPath);
  if (!await dir.exists()) {
    throw FileSystemException(
        "Directory not found: $path (resolved to $dirPath)", path);
  }
  return dir.listSync();
}