add new api for folder deletion
add new api for folder deletion
fix handling of library deletion