prevent directories from being returned in rest api