Way to identify if a hash is a directory or a file

test "$(ipfs dag get Qm... | jq .data)" = '"CAE="'

If true, it’s a directory