1 #ifndef _WIMLIB_PATHS_H
2 #define _WIMLIB_PATHS_H
4 #include "wimlib/compiler.h"
5 #include "wimlib/types.h"
8 path_basename(const tchar *path);
11 path_basename_with_len(const tchar *path, size_t len);
14 path_stream_name(const tchar *path);
17 do_canonicalize_path(const tchar *in, tchar *out);
20 canonicalize_wim_path(const tchar *wim_path) _malloc_attribute;
22 /* is_any_path_separator() - characters treated as path separators in WIM path
23 * specifications and capture configuration files (the former will be translated
24 * to WIM_PATH_SEPARATOR; the latter will be translated to
25 * OS_PREFERRED_PATH_SEPARATOR)
27 * OS_PREFERRED_PATH_SEPARATOR - preferred (or only) path separator on the
28 * operating system. Used when constructing filesystem paths to extract or
31 * WIM_PATH_SEPARATOR - character treated as path separator for WIM paths.
32 * Currently needs to be '/' on UNIX for the WIM mounting code to work properly.
36 # define OS_PREFERRED_PATH_SEPARATOR L'\\'
37 # define is_any_path_separator(c) ((c) == L'/' || (c) == L'\\')
39 # define OS_PREFERRED_PATH_SEPARATOR '/'
40 # define is_any_path_separator(c) ((c) == '/' || (c) == '\\')
43 #define WIM_PATH_SEPARATOR WIMLIB_WIM_PATH_SEPARATOR
45 #endif /* _WIMLIB_PATHS_H */