DRY for directories