Use given listDirectory function (v2)