aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/utils.h
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2015-04-15 16:29:18 +0200
committerMartin Willi <martin@revosec.ch>2015-04-16 14:50:04 +0200
commit001a22e2c12657461ed515581cbdc27f83e2c99c (patch)
treedb58acfe239d8fc1e6935b0386e2e79c03a1a20e /src/libstrongswan/utils/utils.h
parent7585a85f1ac81c6a39b968cbefebe22e87338f41 (diff)
downloadstrongswan-001a22e2c12657461ed515581cbdc27f83e2c99c.tar.bz2
strongswan-001a22e2c12657461ed515581cbdc27f83e2c99c.tar.xz
path: Move path related utility functions to separate files
Diffstat (limited to 'src/libstrongswan/utils/utils.h')
-rw-r--r--src/libstrongswan/utils/utils.h53
1 files changed, 1 insertions, 52 deletions
diff --git a/src/libstrongswan/utils/utils.h b/src/libstrongswan/utils/utils.h
index 4ecd0d39d..7ecc42cb7 100644
--- a/src/libstrongswan/utils/utils.h
+++ b/src/libstrongswan/utils/utils.h
@@ -81,21 +81,13 @@
#include "utils/string.h"
#include "utils/memory.h"
#include "utils/strerror.h"
+#include "utils/path.h"
#include "utils/tty.h"
#ifdef __APPLE__
# include "compat/apple.h"
#endif
/**
- * Directory separator character in paths on this platform
- */
-#ifdef WIN32
-# define DIRECTORY_SEPARATOR "\\"
-#else
-# define DIRECTORY_SEPARATOR "/"
-#endif
-
-/**
* Initialize utility functions
*/
void utils_init();
@@ -389,49 +381,6 @@ void free_align(void *ptr);
*/
void wait_sigint();
-/**
- * Like dirname(3) returns the directory part of the given null-terminated
- * pathname, up to but not including the final '/' (or '.' if no '/' is found).
- * Trailing '/' are not counted as part of the pathname.
- *
- * The difference is that it does this in a thread-safe manner (i.e. it does not
- * use static buffers) and does not modify the original path.
- *
- * @param path original pathname
- * @return allocated directory component
- */
-char *path_dirname(const char *path);
-
-/**
- * Like basename(3) returns the filename part of the given null-terminated path,
- * i.e. the part following the final '/' (or '.' if path is empty or NULL).
- * Trailing '/' are not counted as part of the pathname.
- *
- * The difference is that it does this in a thread-safe manner (i.e. it does not
- * use static buffers) and does not modify the original path.
- *
- * @param path original pathname
- * @return allocated filename component
- */
-char *path_basename(const char *path);
-
-/**
- * Check if a given path is absolute.
- *
- * @param path path to check
- * @return TRUE if absolute, FALSE if relative
- */
-bool path_absolute(const char *path);
-
-/**
- * Creates a directory and all required parent directories.
- *
- * @param path path to the new directory
- * @param mode permissions of the new directory/directories
- * @return TRUE on success
- */
-bool mkdir_p(const char *path, mode_t mode);
-
#ifndef HAVE_CLOSEFROM
/**
* Close open file descriptors greater than or equal to lowfd.