~lattis/muon

ref: f9a8cbad39b665a9496cd3adb4756e85ee5ec97c muon/include/platform/path.h -rw-r--r-- 844 bytes
f9a8cbadStone Tickle print stdout/stderr of failing test 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef MUON_PLATFORM_PATH_H
#define MUON_PLATFORM_PATH_H
#include <stdbool.h>
#include <stdint.h>

#define PATH_SEP '/'

bool path_init(void);
bool path_cwd(char *buf, uint32_t len);
bool path_chdir(const char *path);
bool path_is_absolute(const char *path);
bool path_join(char *buf, uint32_t len, const char *a, const char *b);
bool path_make_absolute(char *buf, uint32_t len, const char *path);
bool path_relative_to(char *buf, uint32_t len, const char *base, const char *path);
bool path_is_basename(const char *path);
bool path_basename(char *buf, uint32_t len, const char *path);
bool path_dirname(char *buf, uint32_t len, const char *path);
bool path_is_subpath(const char *base, const char *sub);
bool path_add_suffix(char *path, uint32_t len, const char *suff);
bool path_executable(char *buf, uint32_t len, const char *path);
#endif