Find the parent of a Mailbox path.
More...
Find the parent of a Mailbox path.
- Parameters
-
- Return values
-
- Precondition
- path is not NULL
◆ comp_path_parent()
static int comp_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition at line 932 of file compress.c.
933{
935 return 0;
936
937 if (
buf_at(path, 0) ==
'~')
939
941 return 0;
942
943 return -1;
944}
char buf_at(const struct Buffer *buf, size_t offset)
Return the character at the given offset.
char * HomeDir
User's home directory.
bool mutt_path_canon(struct Buffer *path, const char *homedir, bool is_dir)
Create the canonical version of a path.
bool mutt_path_parent(struct Buffer *path)
Find the parent of a path.
◆ imap_path_parent()
static int imap_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition at line 2390 of file imap.c.
2391{
2393
2396 return 0;
2397}
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
void imap_get_parent_path(const char *path, char *buf, size_t buflen)
Get the path of the parent folder.
◆ maildir_path_parent()
static int maildir_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
◆ mh_path_parent()
static int mh_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition at line 1175 of file mh.c.
1176{
1178 return 0;
1179
1180 if (
buf_at(path, 0) ==
'~')
1182
1184 return 0;
1185
1186 return -1;
1187}
◆ mbox_path_parent()
static int mbox_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
Find the parent of a Mailbox path - Implements MxOps::path_parent() -.
Definition at line 1636 of file mbox.c.
1637{
1639 return 0;
1640
1641 if (
buf_at(path, 0) ==
'~')
1643
1645 return 0;
1646
1647 return -1;
1648}
◆ nntp_path_parent()
static int nntp_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
◆ nm_path_parent()
static int nm_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |
◆ pop_path_parent()
static int pop_path_parent |
( |
struct Buffer * |
path | ) |
|
|
static |