NeoMutt  2021-02-05-666-ge300cd
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 
29 struct Buffer;
30 
31 bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder);
32 const char *mutt_path_basename(const char *f);
33 bool mutt_path_canon(char *buf, size_t buflen, const char *homedir, bool is_dir);
34 char * mutt_path_concat(char *d, const char *dir, const char *fname, size_t l);
35 char * mutt_path_dirname(const char *path);
36 char * mutt_path_escape(const char *src);
37 const char *mutt_path_getcwd(struct Buffer *cwd);
38 bool mutt_path_parent(char *buf, size_t buflen);
39 bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir);
40 size_t mutt_path_realpath(char *buf);
41 bool mutt_path_tidy(char *buf, bool is_dir);
42 bool mutt_path_tidy_dotdot(char *buf);
43 bool mutt_path_tidy_slash(char *buf, bool is_dir);
44 bool mutt_path_tilde(char *buf, size_t buflen, const char *homedir);
45 bool mutt_path_to_absolute(char *path, const char *reference);
46 
47 #endif /* MUTT_LIB_PATH_H */
bool mutt_path_tilde(char *buf, size_t buflen, const char *homedir)
Expand &#39;~&#39; in a path.
Definition: path.c:223
bool mutt_path_tidy(char *buf, bool is_dir)
Remove unnecessary parts of a path.
Definition: path.c:165
String manipulation buffer.
Definition: buffer.h:33
bool mutt_path_parent(char *buf, size_t buflen)
Find the parent of a path.
Definition: path.c:459
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_canon(char *buf, size_t buflen, const char *homedir, bool is_dir)
Create the canonical version of a path.
Definition: path.c:285
bool mutt_path_tidy_slash(char *buf, bool is_dir)
Remove unnecessary slashes and dots.
Definition: path.c:54
bool mutt_path_tidy_dotdot(char *buf)
Remove dot-dot-slash from a path.
Definition: path.c:105
const char * mutt_path_basename(const char *f)
Find the last component for a pathname.
Definition: path.c:329
char * mutt_path_escape(const char *src)
Escapes single quotes in a path for a command string.
Definition: path.c:522
const char * mutt_path_getcwd(struct Buffer *cwd)
Get the current working directory.
Definition: path.c:563
char * mutt_path_dirname(const char *path)
Return a path up to, but not including, the final &#39;/&#39;.
Definition: path.c:376
bool mutt_path_to_absolute(char *path, const char *reference)
Convert relative filepath to an absolute path.
Definition: path.c:397
bool mutt_path_pretty(char *buf, size_t buflen, const char *homedir, bool is_dir)
Tidy a filesystem path.
Definition: path.c:186
size_t mutt_path_realpath(char *buf)
resolve path, unraveling symlinks
Definition: path.c:440
bool mutt_path_abbr_folder(char *buf, size_t buflen, const char *folder)
Create a folder abbreviation.
Definition: path.c:492