path.h 621 B

123456789101112131415161718192021222324
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #ifndef TOR_PATH_H
  6. #define TOR_PATH_H
  7. #include "lib/cc/compat_compiler.h"
  8. #ifdef _WIN32
  9. #define PATH_SEPARATOR "\\"
  10. #else
  11. #define PATH_SEPARATOR "/"
  12. #endif
  13. char *get_unquoted_path(const char *path);
  14. char *expand_filename(const char *filename);
  15. int path_is_relative(const char *filename);
  16. void clean_fname_for_stat(char *name);
  17. int get_parent_directory(char *fname);
  18. char *make_path_absolute(char *fname);
  19. #endif