Add metadata method for listing directories