file-name-lookup.lisp 638 B

1234567891011121314151617181920212223242526
  1. (in-package :hurd)
  2. (defcfun ("file_name_lookup" %file-name-lookup)
  3. file-t
  4. (name :string)
  5. (flags open-flags)
  6. (mode mode-t))
  7. (defcfun ("file_name_lookup_under" %file-name-lookup-under)
  8. file-t
  9. (startdir file-t)
  10. (name :string)
  11. (flags open-flags)
  12. (mode mode-t))
  13. (defun file-name-lookup (name &key
  14. (flags nil)
  15. (mode nil)
  16. (under nil))
  17. "Open a port to file 'name'. If 'under' is given start the lookup at that port."
  18. (cond
  19. (under (%file-name-lookup-under under name flags mode))
  20. (t (%file-name-lookup name flags mode))))