Future<int> filesCount() async { var dir = Directory(location); if (dir.existsSync()) { return await dir.list().length; } return 0; }