parseDomainDirectory static method
Parses a domain Directory.
Implementation
static Directory? parseDomainDirectory(Object? dirPath,
{bool checkDirectoryExistence = false}) {
if (dirPath == null) return null;
if (dirPath is Directory) return dirPath;
var p = dirPath.toString();
var dir = Directory(p);
return !checkDirectoryExistence || dir.existsSync() ? dir : null;
}