Synchronously checks if typeSync(path) returns FileSystemEntityType.directory.
static bool isDirectorySync(String path) => (_getTypeSync(_toUtf8Array(path), true) == FileSystemEntityType.directory);