add refreshDirFlags method to avoid refreshing too many files
Merge pull request #359 from Xuyuanp/up/master

add refreshDirFlags method to avoid refreshing too many files