add filter support to method ResourceUtil.isEmptyDirectory