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