low level get path for kdb
add recursive flag