Function: feedmail-look-at-queue-directory
feedmail-look-at-queue-directory is a byte-compiled function defined
in feedmail.el.gz.
Signature
(feedmail-look-at-queue-directory QUEUE-DIRECTORY)
Documentation
Find out some things about a queue directory.
Result is a list containing a count of queued messages in the directory, a count of other files in the directory, and a high water mark for prefix sequence numbers. Subdirectories are not included in the counts.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/feedmail.el.gz
(defun feedmail-look-at-queue-directory (queue-directory)
"Find out some things about a queue directory.
Result is a list containing a count of queued messages in the
directory, a count of other files in the directory, and a high water
mark for prefix sequence numbers. Subdirectories are not included in
the counts."
(feedmail-say-debug ">in-> feedmail-look-at-queue-directory %s" queue-directory)
(let ((q-cnt 0) (q-oth 0) (high-water 0) (blobbet))
;; iterate, counting things we find along the way in the directory
(if (file-directory-p queue-directory)
(mapc
(lambda (blobby)
(cond
((file-directory-p blobby) nil) ; don't care about subdirs
((feedmail-fqm-p blobby)
(setq blobbet (file-name-nondirectory blobby))
(if (string-match "^[0-9][0-9][0-9]-" blobbet)
(let ((water-mark))
(setq water-mark (string-to-number (substring blobbet 0 3)))
(if (> water-mark high-water) (setq high-water water-mark))))
(setq q-cnt (1+ q-cnt)))
(t (setq q-oth (1+ q-oth)))
))
(directory-files queue-directory t)))
(list q-cnt q-oth high-water)))