Tor  0.4.5.0-alpha-dev
path.h
Go to the documentation of this file.
1 /* Copyright (c) 2003-2004, Roger Dingledine
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2020, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 /**
7  * \file path.h
8  *
9  * \brief Header for path.c
10  **/
11 
12 #ifndef TOR_PATH_H
13 #define TOR_PATH_H
14 
15 #include <stdbool.h>
16 #ifdef _WIN32
17 #include <windows.h>
18 #endif
19 #include "lib/cc/compat_compiler.h"
20 
21 #ifdef _WIN32
22 #define PATH_SEPARATOR "\\"
23 #else
24 #define PATH_SEPARATOR "/"
25 #endif
26 
27 char *get_unquoted_path(const char *path);
28 char *expand_filename(const char *filename);
29 int path_is_relative(const char *filename);
30 void clean_fname_for_stat(char *name);
31 int get_parent_directory(char *fname);
32 char *make_path_absolute(const char *fname);
33 struct smartlist_t *tor_glob(const char *pattern);
34 bool has_glob(const char *s);
35 struct smartlist_t *get_glob_opened_files(const char *pattern);
36 
37 #endif /* !defined(TOR_PATH_H) */
clean_fname_for_stat
void clean_fname_for_stat(char *name)
Definition: path.c:164
name
const char * name
Definition: config.c:2443
make_path_absolute
char * make_path_absolute(const char *fname)
Definition: path.c:280
has_glob
bool has_glob(const char *s)
Definition: path.c:623
get_glob_opened_files
struct smartlist_t * get_glob_opened_files(const char *pattern)
Definition: path.c:666
path_is_relative
int path_is_relative(const char *filename)
Definition: path.c:145
get_parent_directory
int get_parent_directory(char *fname)
Definition: path.c:195
get_unquoted_path
char * get_unquoted_path(const char *path)
Definition: path.c:51
tor_glob
struct smartlist_t * tor_glob(const char *pattern)
Definition: path.c:569
expand_filename
char * expand_filename(const char *filename)
Definition: path.c:85
smartlist_t
Definition: smartlist_core.h:26
compat_compiler.h
Utility macros to handle different features and behavior in different compilers.