isDirectory function

bool isDirectory(
  1. String path
)

true if the given path is a directory.

Implementation

bool isDirectory(String path) {
  final fromType = FileSystemEntity.typeSync(path);
  return fromType == FileSystemEntityType.directory;
}