doc
csync_exclude.h
Go to the documentation of this file.
1 /*
2  * libcsync -- a library to sync a directory with another
3  *
4  * Copyright (c) 2008 by Andreas Schneider <mail@cynapses.org>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _CSYNC_EXCLUDE_H
22 #define _CSYNC_EXCLUDE_H
23 
30 };
32 /**
33  * @brief Load exclude list
34  *
35  * @param ctx The context of the synchronizer.
36  * @param fname The filename to load.
37  *
38  * @return 0 on success, -1 if an error occured with errno set.
39  */
40 int csync_exclude_load(CSYNC *ctx, const char *fname);
41 
42 /**
43  * @brief Clear the exclude list in memory.
44  *
45  * @param ctx The synchronizer context.
46  */
47 void csync_exclude_clear(CSYNC *ctx);
48 
49 /**
50  * @brief Destroy the exclude list in memory.
51  *
52  * @param ctx The synchronizer context.
53  */
54 void csync_exclude_destroy(CSYNC *ctx);
55 
56 /**
57  * @brief Check if the given path should be excluded.
58  *
59  * This excludes also paths which can't be used without unix extensions.
60  *
61  * @param ctx The synchronizer context.
62  * @param path The patch to check.
63  *
64  * @return 2 if excluded and needs cleanup, 1 if excluded, 0 if not.
65  */
66 CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype);
67 
68 #endif /* _CSYNC_EXCLUDE_H */
69 
70 /* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */
csync public structure
Definition: csync_private.h:88
CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype)
Check if the given path should be excluded.
enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE
Definition: csync_exclude.h:31
void csync_exclude_destroy(CSYNC *ctx)
Destroy the exclude list in memory.
void csync_exclude_clear(CSYNC *ctx)
Clear the exclude list in memory.
char path[1]
Definition: csync_private.h:81
csync_exclude_type_e
Definition: csync_exclude.h:24
int csync_exclude_load(CSYNC *ctx, const char *fname)
Load exclude list.