add function about document directory.