Go to the documentation of this file.
25 #ifndef __UTIL_PATH_H__
26 #define __UTIL_PATH_H__
28 #ifndef HAVE_NON_POSIX_MKDIR
29 #define SCMkDir(a, b) mkdir(a, b)
31 #define SCMkDir(a, b) mkdir(a)
36 TmEcode PathJoin (
char *out_buf, uint16_t buf_len,
const char *
const dir,
const char *
const fname);
42 char *
SCRealPath(
const char *path,
char *resolved_path);
int PathIsAbsolute(const char *)
Check if a path is absolute.
bool SCIsRegularDirectory(const struct dirent *const dir_entry)
OS independent wrapper for directory check.
int PathIsRelative(const char *)
Check if a path is relative.
TmEcode PathJoin(char *out_buf, uint16_t buf_len, const char *const dir, const char *const fname)
Wrapper to join a directory and filename and resolve using realpath _fullpath is used for WIN32.
bool SCIsRegularFile(const struct dirent *const dir_entry)
OS independent to check for regular file.
char * SCRealPath(const char *path, char *resolved_path)
OS independent wrapper for realpath.
int SCCreateDirectoryTree(const char *path, const bool final)
Recursively create a directory.
int SCDefaultMkDir(const char *path)
Wrapper around SCMkDir with default mode arguments.
const char * SCBasename(const char *path)
bool SCPathExists(const char *path)
Check if a path exists.