1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <stdio.h>
5 
6 int fopen_temporary(const char *path, FILE **_f, char **_temp_path);
7 int mkostemp_safe(char *pattern);
8 int fmkostemp_safe(char *pattern, const char *mode, FILE**_f);
9 
10 int tempfn_xxxxxx(const char *p, const char *extra, char **ret);
11 int tempfn_random(const char *p, const char *extra, char **ret);
12 int tempfn_random_child(const char *p, const char *extra, char **ret);
13 
14 int open_tmpfile_unlinkable(const char *directory, int flags);
15 int open_tmpfile_linkable(const char *target, int flags, char **ret_path);
16 int fopen_tmpfile_linkable(const char *target, int flags, char **ret_path, FILE **ret_file);
17 
18 int link_tmpfile(int fd, const char *path, const char *target);
19 int flink_tmpfile(FILE *f, const char *path, const char *target);
20 
21 int mkdtemp_malloc(const char *template, char **ret);
22