add ds func for dirs.

Signed-off-by: kangliang.zkl <kangliang.zkl@alibaba-inc.com>