isDirectory method Null safety

Future<bool> isDirectory(
  1. String path
)

Whether path refers to a directory.

Checks whether type(path) returns FileSystemEntityType.directory.

Implementation

static Future<bool> isDirectory(String path) =>
    _getType(_toUtf8Array(path), true)
        .then((type) => (type == FileSystemEntityType.directory));