Greenbone Vulnerability Management Libraries  22.8.0
fileutils.h
Go to the documentation of this file.
1 /* SPDX-FileCopyrightText: 2009-2023 Greenbone AG
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  */
5 
13 #ifndef _GVM_FILEUTILS_H
14 #define _GVM_FILEUTILS_H
15 
16 #include <glib.h>
17 
18 int
19 gvm_file_exists (const char *name);
20 
21 int
22 gvm_file_is_executable (const char *name);
23 
24 int
25 gvm_file_is_readable (const char *name);
26 
27 int
28 gvm_file_check_is_dir (const char *name);
29 
30 int
31 gvm_file_remove_recurse (const gchar *pathname);
32 
33 gboolean
34 gvm_file_copy (const gchar *, const gchar *);
35 
36 gboolean
37 gvm_file_move (const gchar *, const gchar *);
38 
39 char *
40 gvm_file_as_base64 (const char *);
41 
42 gchar *
43 gvm_export_file_name (const char *, const char *, const char *, const char *,
44  const char *, const char *, const char *, const char *);
45 
46 #endif /* not _GVM_FILEUTILS_H */
gvm_export_file_name
gchar * gvm_export_file_name(const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *)
Generates a file name for exporting.
Definition: fileutils.c:269
gvm_file_is_executable
int gvm_file_is_executable(const char *name)
Checks whether a file or directory exists and is executable.
Definition: fileutils.c:89
gvm_file_check_is_dir
int gvm_file_check_is_dir(const char *name)
Checks whether a file is a directory or not.
Definition: fileutils.c:45
gvm_file_exists
int gvm_file_exists(const char *name)
Checks whether a file or directory exists.
Definition: fileutils.c:71
gvm_file_as_base64
char * gvm_file_as_base64(const char *)
Get the content of a file in base64 format.
Definition: fileutils.c:238
gvm_file_move
gboolean gvm_file_move(const gchar *, const gchar *)
Moves a source file into a destination file.
Definition: fileutils.c:206
gvm_file_is_readable
int gvm_file_is_readable(const char *name)
Checks whether a file or directory exists and is readable.
Definition: fileutils.c:107
gvm_file_copy
gboolean gvm_file_copy(const gchar *, const gchar *)
Copies a source file into a destination file.
Definition: fileutils.c:171
gvm_file_remove_recurse
int gvm_file_remove_recurse(const gchar *pathname)
Recursively removes files and directories.
Definition: fileutils.c:123