mu: add '--lazy-check' option for indexing

Add an option --lazy-check to ignore any directories that don't have
their ctime changed since the last indexing operation.

There are a few corner-cases (such as editing a message outside mu's
control) where this might miss a change, but apart from that, makes
indexing in for a maildir (and its sub-maildirs) almost a no-op if there
were no changes.
This commit is contained in:
djcb
2016-07-23 19:18:09 +03:00
parent 2a83b02ce2
commit 9477071e63
7 changed files with 115 additions and 72 deletions

View File

@ -129,6 +129,15 @@ MuError mu_maildir_walk (const char *path, MuMaildirWalkMsgCallback cb_msg,
gboolean mu_maildir_clear_links (const gchar* dir, GError **err);
/**
* whether the directory path ends in '/cur/' or '/new/'
*
* @param path some path
*/
gboolean mu_maildir_is_leaf_dir (const char *path);
/**
* get the Maildir flags from the full path of a mailfile. The flags
* are as specified in http://cr.yp.to/proto/maildir.html, plus