generatePath method
Implementation
Future<void> generatePath(
String path, {
bool forceGenerate = false,
bool isFile = true,
bool printError = false,
}) async {
final io = isFile ? File(path) : Directory(path);
final isExists = await io.exists();
if (!forceGenerate && isExists) {
if (printError) print('$path Exists Before');
throw IOFailure(cause: '$path Exists Before');
}
if (io is Directory) await io.create(recursive: true);
if (io is File) await io.create(recursive: true);
}