Add denote--file-empty-p

This commit is contained in:
Protesilaos Stavrou 2022-06-06 14:14:24 +03:00
parent 813004ea53
commit 387ac0c030
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA

View file

@ -139,6 +139,10 @@ trailing hyphen."
"Make STR an appropriate file name slug." "Make STR an appropriate file name slug."
(downcase (denote--slug-hyphenate (denote--slug-no-punct str)))) (downcase (denote--slug-hyphenate (denote--slug-no-punct str))))
(defun denote--file-empty-p (file)
"Return non-nil if FILE is empty."
(zerop (or (file-attribute-size (file-attributes file)) 0)))
;;;; Keywords ;;;; Keywords
(defun denote--directory-files () (defun denote--directory-files ()