path.h 678 B

123456789101112131415161718192021222324252627282930
  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. /**
  6. * \file path.h
  7. *
  8. * \brief Header for path.c
  9. **/
  10. #ifndef TOR_PATH_H
  11. #define TOR_PATH_H
  12. #include "lib/cc/compat_compiler.h"
  13. #ifdef _WIN32
  14. #define PATH_SEPARATOR "\\"
  15. #else
  16. #define PATH_SEPARATOR "/"
  17. #endif
  18. char *get_unquoted_path(const char *path);
  19. char *expand_filename(const char *filename);
  20. int path_is_relative(const char *filename);
  21. void clean_fname_for_stat(char *name);
  22. int get_parent_directory(char *fname);
  23. char *make_path_absolute(char *fname);
  24. #endif