dir-unlink.lisp 806 B

12345678910111213141516171819202122232425
  1. (in-package :hurd-translator)
  2. (def-fs-interface :dir-unlink ((port port)
  3. (name :string))
  4. (with-lookup protid port
  5. (let* ((node (get-node protid))
  6. (user (get-user protid))
  7. (found-node (directory-lookup *translator*
  8. node
  9. user
  10. name)))
  11. (cond
  12. (found-node
  13. (let ((err (remove-directory-entry *translator*
  14. node
  15. user
  16. name)))
  17. (cond
  18. ((eq err t) t)
  19. ((eq err nil) :not-permitted)
  20. (t err))))
  21. (t :no-such-file)))))