We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 231c333 commit d7a688bCopy full SHA for d7a688b
1 file changed
eask-api.el
@@ -54,6 +54,17 @@
54
;;
55
;;; Core
56
57
+(defun eask-api-check-filename (name)
58
+ "Return non-nil if NAME is a valid Eask-file."
59
+ (when-let* ((name (if (string-match "[\\/]" name) ; if path
60
+ (file-name-nondirectory (directory-file-name name))
61
+ name))
62
+ (prefix (cond ((string-prefix-p "Easkfile" name) "Easkfile")
63
+ ((string-prefix-p "Eask" name) "Eask"))))
64
+ (let ((suffix (car (split-string name prefix t))))
65
+ (or (null suffix)
66
+ (string-match-p "^[.][.0-9]*$" suffix)))))
67
+
68
(defun eask-api-files (&optional dir)
69
"Return a list of Eask files.
70
0 commit comments