add readDir interface