NeoMutt  2024-10-02-7-gd3e66a
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
path_is_empty()

Is the Mailbox empty? More...

+ Collaboration diagram for path_is_empty():

Functions

static int imap_path_is_empty (struct Buffer *path)
 Is the mailbox empty - Implements MxOps::path_is_empty() -.
 
static int mbox_path_is_empty (struct Buffer *path)
 Is the mailbox empty - Implements MxOps::path_is_empty() -.
 

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 ( struct Buffer path)
static

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

Definition at line 2390 of file imap.c.

2391{
2392 int rc = imap_path_status(buf_string(path), false);
2393 if (rc < 0)
2394 return -1;
2395 if (rc == 0)
2396 return 1;
2397 return 0;
2398}
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:96
int imap_path_status(const char *path, bool queue)
Refresh the number of total and new messages.
Definition: imap.c:1172
+ Here is the call graph for this function:

◆ mbox_path_is_empty()

static int mbox_path_is_empty ( struct Buffer path)
static

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

Definition at line 1616 of file mbox.c.

1617{
1618 return mutt_file_check_empty(buf_string(path));
1619}
int mutt_file_check_empty(const char *path)
Is the mailbox empty.
Definition: file.c:1436
+ Here is the call graph for this function: