Directory helper method