diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-27 14:45:17 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-27 14:45:17 -0400 |
commit | 000de2f2ac4f740be8351673691371d78a5da7e9 (patch) | |
tree | 1212f745111239dd7713c956ae60b081edfe912a /src/lib/fs/path.h | |
parent | 21136037182f55b5aef3730853e65fa2c7ebd722 (diff) | |
parent | 3d606dddb9a104466906069bd21acbdfb1270b58 (diff) | |
download | tor-000de2f2ac4f740be8351673691371d78a5da7e9.tar.gz tor-000de2f2ac4f740be8351673691371d78a5da7e9.zip |
Merge branch 'fs_refactor'
Diffstat (limited to 'src/lib/fs/path.h')
-rw-r--r-- | src/lib/fs/path.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/fs/path.h b/src/lib/fs/path.h new file mode 100644 index 0000000000..a3073a99ec --- /dev/null +++ b/src/lib/fs/path.h @@ -0,0 +1,24 @@ +/* Copyright (c) 2003-2004, Roger Dingledine + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +#ifndef TOR_PATH_H +#define TOR_PATH_H + +#include "lib/cc/compat_compiler.h" + +#ifdef _WIN32 +#define PATH_SEPARATOR "\\" +#else +#define PATH_SEPARATOR "/" +#endif + +char *get_unquoted_path(const char *path); +char *expand_filename(const char *filename); +int path_is_relative(const char *filename); +void clean_fname_for_stat(char *name); +int get_parent_directory(char *fname); +char *make_path_absolute(char *fname); + +#endif |