lib: add interface to delete directory documents