errno 1.0.0
errno: ^1.0.0 copied to clipboard
Errno
example/example.dart
import 'dart:io';
import 'package:errno/errno.dart';
void main() {
try {
var lst = Directory("My Documents").listSync();
print(lst);
} on FileSystemException catch (exc) {
if (exc.osError?.errorCode == WindowsErrors.pathNotFound) {
print("The directory does not exist.");
} else {
rethrow;
}
}
}