2 * mkdir_p, a very simple `mkdir -p` implementation in C
3 * Copyright (C) 2016 Rafał Długołęcki
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
18 #include <sys/types.h>
20 #define MKDIR_P_VERSION "0.1"
21 #define MKDIR_P_SEPARATOR '/'
24 * Creates directory, when parent directories are missing, creates them too
26 * @param pathname NULL terminated string containing directory path
27 * @param mode specifies permissions for created directories (parameter is
28 * passed directly to the mkdir)
30 int mkdir_p(const char *pathname, mode_t mode);
32 #endif /* __MKDIR_P_H */