bool hasTag(int tag) { for (var directory in directories.values) { if (directory.containsKey(tag)) { return true; } } return false; }