bool isDirectorySync(
String path
)

Synchronously checks if typeSync(path) returns FileSystemEntityType.DIRECTORY.

Source

/**
 * Synchronously checks if typeSync(path) returns
 * FileSystemEntityType.DIRECTORY.
 */
static bool isDirectorySync(String path) =>
    (_getTypeSync(path, true) == FileSystemEntityType.DIRECTORY._type);