How can I check if a file exists using Emacs Lisp?

前端 未结 3 1845
萌比男神i
萌比男神i 2021-02-01 12:09

I would like emacs to mark files that are generated as read-only when they\'re opened. The part of the puzzle that I\'m missing is how to check if a file \"exists\". I current

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 12:42

    Use f.el, modern library for file and directory manipulation. You can use f-exists?, f-file?, f-directory? and many other predicates. The library is better than standard functions, because it's every file related function you'll ever need under one namespace.

提交回复
热议问题