isDirectory static method

bool isDirectory(
  1. String pathString
)

Checks if a path exists and is a directory.

Implementation

static bool isDirectory(String pathString) {
  try {
    return Directory(pathString).existsSync();
  } catch (e) {
    return false;
  }
}