NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
path_is_empty()

Is the Mailbox empty? More...

+ Collaboration diagram for path_is_empty():

Functions

static int imap_path_is_empty (const char *path)
 Is the mailbox empty - Implements MxOps::path_is_empty() -. More...
 
static int mbox_path_is_empty (const char *path)
 Is the mailbox empty - Implements MxOps::path_is_empty() -. More...
 

Detailed Description

Is the Mailbox empty?

Parameters
pathMailbox to check
Return values
1Mailbox is empty
0Mailbox contains mail
-1Error

Contract

Function Documentation

◆ imap_path_is_empty()

static int imap_path_is_empty ( const char *  path)
static

Is the mailbox empty - Implements MxOps::path_is_empty() -.

Definition at line 2473 of file imap.c.

2474{
2475 int rc = imap_path_status(path, false);
2476 if (rc < 0)
2477 return -1;
2478 if (rc == 0)
2479 return 1;
2480 return 0;
2481}
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
Definition: imap.c:1238
+ Here is the call graph for this function:

◆ mbox_path_is_empty()

static int mbox_path_is_empty ( const char *  path)
static

Is the mailbox empty - Implements MxOps::path_is_empty() -.

Definition at line 1747 of file mbox.c.

1748{
1749 return mutt_file_check_empty(path);
1750}
int mutt_file_check_empty(const char *path)
Is the mailbox empty.
Definition: file.c:1468
+ Here is the call graph for this function: