NeoMutt  2021-02-05-666-ge300cd
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 2475 of file imap.c.

2476 {
2477  int rc = imap_path_status(path, false);
2478  if (rc < 0)
2479  return -1;
2480  if (rc == 0)
2481  return 1;
2482  return 0;
2483 }
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
Definition: imap.c:1235
char * path
Path.
Definition: url.h:75
+ 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 1738 of file mbox.c.

1739 {
1740  return mutt_file_check_empty(path);
1741 }
char * path
Path.
Definition: url.h:75
int mutt_file_check_empty(const char *path)
Is the mailbox empty.
Definition: file.c:1415
+ Here is the call graph for this function: