Bump copyright date to 2019
[tor.git] / src / lib / fs / dir.h
blob826bc2dfc5fafe25e3f10de9104f1d9cec466265
1 /* Copyright (c) 2003-2004, Roger Dingledine
2 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3 * Copyright (c) 2007-2019, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
6 #ifndef TOR_DIR_H
7 #define TOR_DIR_H
9 /**
10 * \file dir.h
12 * \brief Header for dir.c
13 **/
15 #include "lib/cc/compat_compiler.h"
16 #include "lib/testsupport/testsupport.h"
18 /** Possible behaviors for check_private_dir() on encountering a nonexistent
19 * directory; see that function's documentation for details. */
20 typedef unsigned int cpd_check_t;
21 #define CPD_NONE 0
22 #define CPD_CREATE (1u << 0)
23 #define CPD_CHECK (1u << 1)
24 #define CPD_GROUP_OK (1u << 2)
25 #define CPD_GROUP_READ (1u << 3)
26 #define CPD_CHECK_MODE_ONLY (1u << 4)
27 #define CPD_RELAX_DIRMODE_CHECK (1u << 5)
28 MOCK_DECL(int, check_private_dir, (const char *dirname, cpd_check_t check,
29 const char *effective_user));
31 MOCK_DECL(struct smartlist_t *, tor_listdir, (const char *dirname));
33 #endif