readControllersPath static method
Implementation
static Future<Directory> readControllersPath() async {
String folderPath = "";
while (folderPath.isEmpty) {
stdout.write("Enter your controller folder path : ");
folderPath = (stdin.readLineSync() ?? "")
.trim()
.checkIfEmptyAndNullAndShowMessage(
"😢 Folder name cannot be empty !!");
bool acceptPath = await Directory(folderPath).exists();
if (!acceptPath) {
print("😢 '$folderPath' path not found ... !!\n");
folderPath = "";
}
}
return Directory(folderPath);
}