NeoMutt  2022-04-29-249-gaae397
Teaching an old dog new tricks
DOXYGEN
path.h
Go to the documentation of this file.
1
23#ifndef MUTT_LIB_PATH_H
24#define MUTT_LIB_PATH_H
25
26#include <stdbool.h>
27#include <stdio.h>
28
29struct Buffer;
30
31bool mutt_path_abbr_folder(char *buf, const char *folder);
32const char *mutt_path_basename(const char *f);
33bool mutt_path_canon(char *buf, size_t buflen, const char *homedir, bool is_dir);
34char * mutt_path_concat(char *d, const char *dir, const char *fname, size_t l);
35char * mutt_path_dirname(const char *path);
36char * mutt_path_escape(const char *src);
37const char *mutt_path_getcwd(struct Buffer *cwd);
38bool mutt_path_parent(char *buf);
39bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir);
40size_t mutt_path_realpath(char *buf);
41bool mutt_path_tidy(char *buf, bool is_dir);
42bool mutt_path_tidy_dotdot(char *buf);
43bool mutt_path_tidy_slash(char *buf, bool is_dir);
44bool mutt_path_tilde(char *buf, size_t buflen, const char *homedir);
45bool mutt_path_to_absolute(char *path, const char *reference);
46
47#endif /* MUTT_LIB_PATH_H */
bool mutt_path_tidy_dotdot(char *buf)
Remove dot-dot-slash from a path.
Definition: path.c:105
bool mutt_path_tidy(char *buf, bool is_dir)
Remove unnecessary parts of a path.
Definition: path.c:165
const char * mutt_path_basename(const char *f)
Find the last component for a pathname.
Definition: path.c:329
bool mutt_path_tilde(char *buf, size_t buflen, const char *homedir)
Expand '~' in a path.
Definition: path.c:223
char * mutt_path_concat(char *d, const char *dir, const char *fname, size_t l)
Join a directory name and a filename.
Definition: path.c:351
bool mutt_path_to_absolute(char *path, const char *reference)
Convert relative filepath to an absolute path.
Definition: path.c:397
bool mutt_path_abbr_folder(char *buf, const char *folder)
Create a folder abbreviation.
Definition: path.c:490
char * mutt_path_escape(const char *src)
Escapes single quotes in a path for a command string.
Definition: path.c:520
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
char * mutt_path_dirname(const char *path)
Return a path up to, but not including, the final '/'.
Definition: path.c:376
bool mutt_path_tidy_slash(char *buf, bool is_dir)
Remove unnecessary slashes and dots.
Definition: path.c:54
bool mutt_path_canon(char *buf, size_t buflen, const char *homedir, bool is_dir)
Create the canonical version of a path.
Definition: path.c:285
const char * mutt_path_getcwd(struct Buffer *cwd)
Get the current working directory.
Definition: path.c:561
bool mutt_path_parent(char *buf)
Find the parent of a path.
Definition: path.c:458
size_t mutt_path_realpath(char *buf)
Resolve path, unraveling symlinks.
Definition: path.c:440
String manipulation buffer.
Definition: buffer.h:34