bool directoryEmpty(String path) { final directory = Directory(path); return directory.existsSync() && directory.listSync().isEmpty; }