createDirectoryIfMissing method
Creates directoryPath recursively if it does not exist.
Returns true when created, false when already present.
Implementation
bool createDirectoryIfMissing(String directoryPath) {
final dir = Directory(directoryPath);
if (dir.existsSync()) {
return false;
}
dir.createSync(recursive: true);
return true;
}