clibdocker  0.1.0-alpha.0
A Docker API for C
Macros | Functions
docker_ignore.h File Reference

Docker Ignore File API. More...

#include "docker_util.h"
#include <coll_arraylist.h>
Include dependency graph for docker_ignore.h:

Go to the source code of this file.

Macros

#define DOCKER_IGNORE_NULL   501
 
#define DOCKER_IGNORE_EMPTY   502
 
#define DOCKER_IGNORE_LIST_NULL   503
 
#define DOCKER_IGNORE_ALLOC_ERROR   504
 

Functions

d_err_t readlines_dockerignore (const char *contents, arraylist *lines)
 
int dockerignore_check (arraylist *ignore, const char *path)
 Not implemeted. More...
 
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. More...
 

Detailed Description

Docker Ignore File API.

Macro Definition Documentation

◆ DOCKER_IGNORE_ALLOC_ERROR

#define DOCKER_IGNORE_ALLOC_ERROR   504

Docker ignore allocation error code

◆ DOCKER_IGNORE_EMPTY

#define DOCKER_IGNORE_EMPTY   502

Docker ignore file is empty error code

◆ DOCKER_IGNORE_LIST_NULL

#define DOCKER_IGNORE_LIST_NULL   503

Docker ignore list is null error code

◆ DOCKER_IGNORE_NULL

#define DOCKER_IGNORE_NULL   501

Docker ignore file is null error code

Function Documentation

◆ dockerignore_check()

int dockerignore_check ( arraylist *  ignore,
const char *  path 
)

Not implemeted.

Parameters
ignore
path
Returns
MODULE_API

◆ list_dir_w_ignore()

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.

Parameters
folder_pathpath to the folder/dir to list
dockerignore_pathpath to the docker ignore file
Returns
arraylist* list of paths in the folder, which are not ignored.

References docker_log_debug, readlines_dockerignore(), and str_clone().

◆ readlines_dockerignore()

d_err_t readlines_dockerignore ( const char *  contents,
arraylist *  lines 
)

Parse the contents of the dockerignore file into lines

Parameters
contentsstring contents of the file
linespointer to arraylist which will store the lines
Returns
error code

Referenced by list_dir_w_ignore().