Add some methods to Directory