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