validateNotEmpty method
Validates if the file is not empty.
Implementation
String? validateNotEmpty() {
if (!existsSync()) {
return "File does not exist.";
}
if (lengthSync() == 0) {
return "File is empty.";
}
return null;
}
Validates if the file is not empty.
String? validateNotEmpty() {
if (!existsSync()) {
return "File does not exist.";
}
if (lengthSync() == 0) {
return "File is empty.";
}
return null;
}