clibdocker  0.1.0-alpha.0
A Docker API for C
docker_ignore.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2018-2022 Abhishek Mishra
4  *
5  * This file is part of clibdocker.
6  *
7  * clibdocker is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation,
10  * either version 3 of the License, or (at your option)
11  * any later version.
12  *
13  * clibdocker is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public
19  * License along with clibdocker.
20  * If not, see <https://www.gnu.org/licenses/>.
21  *
22  */
23 
24 
30 #ifndef SRC_DOCKER_IGNORE_H_
31 #define SRC_DOCKER_IGNORE_H_
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #include "docker_util.h"
38 #include <coll_arraylist.h>
39 
41 #define DOCKER_IGNORE_NULL 501
43 #define DOCKER_IGNORE_EMPTY 502
45 #define DOCKER_IGNORE_LIST_NULL 503
47 #define DOCKER_IGNORE_ALLOC_ERROR 504
48 
56 MODULE_API d_err_t readlines_dockerignore(const char* contents, arraylist* lines);
57 
58 //TODO: implement docker ignore check
66 MODULE_API int dockerignore_check(arraylist* ignore, const char* path);
67 
75 MODULE_API arraylist* list_dir_w_ignore(const char* folder_path, const char* dockerignore_path);
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* SRC_DOCKER_IGNORE_H_ */
arraylist * list_dir_w_ignore(const char *folder_path, const char *dockerignore_path)
List given folder path, while applying the rules in the docker ignore list.
Definition: docker_ignore.c:72
int dockerignore_check(arraylist *ignore, const char *path)
Not implemeted.
Definition: docker_ignore.c:68
d_err_t readlines_dockerignore(const char *contents, arraylist *lines)
Definition: docker_ignore.c:35
enum _config_error d_err_t
Definition: docker_result.h:60
Docker API utils.