Tor 0.4.9.1-alpha-dev
|
Go to the source code of this file.
Macros | |
#define | PATH_SEPARATOR "/" |
Functions | |
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 (const char *fname) |
struct smartlist_t * | tor_glob (const char *pattern) |
bool | has_glob (const char *s) |
struct smartlist_t * | get_glob_opened_files (const char *pattern) |
void clean_fname_for_stat | ( | char * | name | ) |
char * expand_filename | ( | const char * | filename | ) |
struct smartlist_t * get_glob_opened_files | ( | const char * | pattern | ) |
int get_parent_directory | ( | char * | fname | ) |
Modify fname to contain the name of its parent directory. Doesn't actually examine the filesystem; does a purely syntactic modification.
The parent of the root director is considered to be itself.
Path separators are the forward slash (/) everywhere and additionally the backslash () on Win32.
Cuts off any number of trailing path separators but otherwise ignores them for purposes of finding the parent directory.
Returns 0 if a parent directory was successfully found, -1 otherwise (fname did not have any path separators or only had them at the end).
char * get_unquoted_path | ( | const char * | path | ) |
bool has_glob | ( | const char * | s | ) |
Returns true if s contains characters that can be globbed. Returns false otherwise.
Definition at line 667 of file path.c.
Referenced by unglob_opened_files().
char * make_path_absolute | ( | const char * | fname | ) |
Expand possibly relative path fname to an absolute path. Return a newly allocated string, which may be a duplicate of fname.
Definition at line 280 of file path.c.
Referenced by get_esc_cfile(), and warn_if_option_path_is_relative().
int path_is_relative | ( | const char * | filename | ) |
Return true iff filename is a relative path.
Definition at line 145 of file path.c.
Referenced by warn_if_option_path_is_relative().
struct smartlist_t * tor_glob | ( | const char * | pattern | ) |