NeoMutt  2023-05-17-56-ga67199
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
Precondition
path is not NULL and not empty

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 2398 of file imap.c.

2399{
2400 int rc = imap_path_status(path, false);
2401 if (rc < 0)
2402 return -1;
2403 if (rc == 0)
2404 return 1;
2405 return 0;
2406}
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
Definition: imap.c:1153
+ 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 1757 of file mbox.c.

1758{
1759 return mutt_file_check_empty(path);
1760}
int mutt_file_check_empty(const char *path)
Is the mailbox empty.
Definition: file.c:1455
+ Here is the call graph for this function: