pwd static method
Implementation
static Future<String> pwd() async {
late final String command;
if (Platform.isWindows) {
command = "cd";
} else if (Platform.isLinux) {
command = "pwd";
} else {
// fixme: refactor
// throw AppException(
// message: "Invalid operating system. Please implement first");
}
final data = await Shell().run(command).then((value) => value.outText);
if (Platform.isWindows) {
return pathFormatter(data);
}
return data;
}